/* ==================== GNK DINAMO ZAGREB - PROFILE PAGE ==================== */
/* profile.css - Profile page specific styles */

/* ==================== MAIN LAYOUT ==================== */
.profile-main {
    min-height: calc(100vh - 200px);
    padding: var(--space-8) var(--space-4);
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ==================== PROFILE HEADER ==================== */
.profile-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.profile-header__icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
}

.profile-header__icon svg {
    stroke: var(--color-white);
}

.profile-header__title {
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-2);
}

.profile-header__subtitle {
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* ==================== LOGGED OUT STATE ==================== */
.profile-logged-out {
    text-align: center;
    padding: var(--space-12) var(--space-4);
}

.profile-logged-out__icon {
    width: 80px;
    height: 80px;
    background-color: var(--color-background-card);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
}

.profile-logged-out__icon svg {
    stroke: var(--color-text-muted);
}

.profile-logged-out__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.profile-logged-out__text {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== PROFILE CARDS ==================== */
.profile-card {
    background-color: var(--color-background-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    overflow: hidden;
}

.profile-card__header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-background-card);
}

.profile-card__title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.profile-card__body {
    padding: var(--space-6);
}

.profile-card--logout {
    background-color: transparent;
    border-color: var(--color-border);
}

.profile-card--logout .profile-card__body {
    padding: var(--space-5) var(--space-6);
}

/* ==================== FORM GRID ==================== */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-row {
    display: block;
    width: 100%;
}

.form-row--2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    align-items: start;
}

/* Ensure u-field takes full width in grid */
.form-row u-field,
.form-row--2col u-field {
    display: block;
    width: 100%;
}

/* ==================== PROFILE FIELD STYLING (Unidy SDK) ==================== */

/* Field Container - Force block display and stack layout */
u-field {
    display: block !important;
    width: 100% !important;
}

u-field::part(field-container) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--space-2);
    width: 100%;
}

/* Labels - Always on top */
u-field::part(field_label) {
    display: block !important;
    width: 100%;
    font-family: var(--font-family);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
    order: -1;
}

/* All Input Types - Full width below label */
u-field::part(input_field),
u-field::part(select_field),
u-field::part(textarea_field) {
    display: block !important;
    width: 100% !important;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--color-white);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    transition: all var(--transition-normal);
    box-sizing: border-box;
}

u-field::part(input_field):focus,
u-field::part(select_field):focus,
u-field::part(textarea_field):focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(0, 70, 173, 0.2);
}

/* Select Dropdown Arrow */
u-field::part(select_field) {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B8299' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

u-field::part(select_field--country_code) {
    width: 100% !important;
}

/* Required Indicator */
u-field::part(required-indicator) {
    color: var(--color-error);
    margin-left: var(--space-1);
}

/* Radio Group Styling */
u-field::part(radio-group_field) {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

u-field::part(radio-group-item_label) {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.875rem;
}

u-field::part(radio-group-item_label):hover {
    border-color: var(--color-border-light);
}

u-field::part(radio-group-item_radio) {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

u-field::part(radio_checked) {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ==================== PROFILE SUBMIT ==================== */
.profile-submit {
    margin-top: var(--space-6);
}

.profile-submit-btn {
    width: 100%;
    padding: var(--space-4) var(--space-6);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-white);
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.profile-submit-btn:hover:not(:disabled) {
    background-color: var(--color-primary-light);
}

.profile-submit-btn:disabled {
    background-color: var(--color-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==================== UPDATE MESSAGE ==================== */
.profile-update-message {
    margin-top: var(--space-4);
}

.profile-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
}

.profile-message--success {
    background-color: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: var(--color-success);
}

.profile-message--error {
    background-color: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: var(--color-error);
}

.profile-message svg {
    flex-shrink: 0;
}

/* ==================== LOGOUT SECTION ==================== */
.logout-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.logout-section__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.logout-section__text {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.logout-btn {
    flex-shrink: 0;
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

.logout-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--color-error);
    color: var(--color-error);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .form-row--2col {
        grid-template-columns: 1fr;
    }
    
    .logout-section {
        flex-direction: column;
        text-align: center;
    }
    
    .logout-section__info {
        margin-bottom: var(--space-3);
    }
    
    .logout-btn {
        width: 100%;
    }
}