/*
    Предрейсовые осмотры - мобильное приложение
    Стили компонента заголовка
*/

//---------------------
//Подключение библиотек
//---------------------

const { StyleSheet } = require('react-native'); //StyleSheet React Native
const { APP_COLORS } = require('../../config/theme'); //Цветовая схема приложения
const { UI } = require('../../config/appConfig'); //Конфигурация UI
const { responsiveSize, responsiveSpacing } = require('../../utils/responsive'); //Адаптивные утилиты

//-----------
//Тело модуля
//-----------

//Стили заголовка
const styles = StyleSheet.create({
    container: {
        backgroundColor: APP_COLORS.surface,
        borderBottomWidth: StyleSheet.hairlineWidth,
        borderBottomColor: APP_COLORS.borderSubtle,
        paddingHorizontal: UI.PADDING,
        height: UI.HEADER_HEIGHT,
        justifyContent: 'center',
        shadowColor: APP_COLORS.black,
        shadowOffset: { width: 0, height: 2 },
        shadowOpacity: 0.1,
        shadowRadius: 3,
        elevation: 4,
        zIndex: 10
    },
    content: {
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'space-between',
        flex: 1
    },
    titleContainer: {
        flex: 1,
        marginRight: responsiveSpacing(3),
        justifyContent: 'center'
    },
    title: {
        fontSize: UI.FONT_SIZE_LG,
        fontWeight: '600',
        color: APP_COLORS.textPrimary,
        marginBottom: responsiveSpacing(1)
    },
    subtitle: {
        fontSize: UI.FONT_SIZE_SM,
        color: APP_COLORS.textSecondary,
        includeFontPadding: false
    },
    logo: {
        marginRight: responsiveSpacing(2)
    },
    backButton: {
        width: responsiveSize(40),
        height: responsiveSize(40),
        borderRadius: responsiveSize(20),
        alignItems: 'center',
        justifyContent: 'center',
        backgroundColor: APP_COLORS.primaryLight,
        marginRight: responsiveSpacing(2)
    },
    backButtonPressed: {
        backgroundColor: APP_COLORS.primary
    },
    backArrowIcon: {
        width: responsiveSize(16),
        height: responsiveSize(16),
        alignItems: 'center',
        justifyContent: 'center'
    },
    backArrowLineTop: {
        position: 'absolute',
        width: responsiveSize(10),
        height: responsiveSize(2),
        backgroundColor: APP_COLORS.primary,
        borderRadius: responsiveSize(1),
        transform: [{ rotate: '-45deg' }, { translateY: responsiveSize(-2.5) }]
    },
    backArrowLineBottom: {
        position: 'absolute',
        width: responsiveSize(10),
        height: responsiveSize(2),
        backgroundColor: APP_COLORS.primary,
        borderRadius: responsiveSize(1),
        transform: [{ rotate: '45deg' }, { translateY: responsiveSize(2.5) }]
    },
    menuButton: {
        width: responsiveSize(40),
        height: responsiveSize(40),
        borderRadius: responsiveSize(20),
        alignItems: 'center',
        justifyContent: 'center',
        backgroundColor: APP_COLORS.primaryLight
    },
    menuButtonPressed: {
        backgroundColor: APP_COLORS.primary
    },
    menuButtonIcon: {
        width: responsiveSize(20),
        height: responsiveSize(16),
        justifyContent: 'space-between'
    },
    menuButtonIconLine: {
        height: responsiveSize(2),
        backgroundColor: APP_COLORS.primary,
        borderRadius: responsiveSize(1)
    }
});

//----------------
//Интерфейс модуля
//----------------

module.exports = styles;
