/* assets/css/profile.css */

/* Include your CSS variables here for consistency,
   or ensure they are loaded via a global stylesheet */
:root {
    --color-background-body: #e9ebed;
    --color-text-primary: #333;
    --color-text-secondary: #555;
    --color-text-muted: #666;
    --color-text-light: #777;
    --color-text-meta: #607d8b;
    --color-text-heading: #2c3e50;
    --color-text-subheading: #34495e;
    --color-link-primary: #2980b9;
    --color-link-hover: #1f618d;
    --color-white: #ffffff;
    --color-light-gray: #f8f9fa;
    --color-border-light: #e0e0e0;
    --color-border-medium: #dcdfe3;
    --color-border-dark: #ccc;
    --color-border-soft: #eee;
    --color-primary-button: #2e9e22;
    --color-primary-button-hover: #218838;
    --color-secondary-button: #6c757d;
    --color-secondary-button-hover: #5a6268;
    --color-danger: #e74c3c;
    --color-danger-hover: #c0392b;
    --color-focus-border: #a0cffc;
    --color-edit-button: #3498db;
    --color-edit-button-hover: #2980b9;
    --color-save-button: #2ecc71;
    --color-save-button-hover: #27ae60;
}

/* General Body Styling (ensure your main body style is applied application-wide) */
body {
    background-color: var(--color-background-body);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: var(--color-text-primary);
}

/* Main Profile Setup Container */
.profile-setup-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-border-medium);
    border-radius: 16px; /* Consistent large border-radius */
    box-shadow: 0 4px 8px rgba(0,0,0,0.05); /* Subtle shadow for depth */
    box-sizing: border-box; /* Include padding in width */
}

/* Headings */
.profile-setup-container h2 {
    font-size: 2rem;
    color: var(--color-text-heading);
    margin-bottom: 0.8rem;
    text-align: center;
    font-weight: 700;
}

/* Introductory Paragraph */
.profile-setup-container p {
    text-align: center;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Form Labels */
.profile-form__label {
    display: block; /* Each label on its own line */
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text-subheading);
    font-size: 0.95rem; /* Slightly larger for readability */
}

/* Text Inputs, URLs, Textareas (using new class names) */
.profile-form__input,
.profile-form__textarea {
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: 8px; /* Consistent small border-radius for inputs */
    box-sizing: border-box;
    font-size: 0.9rem;
    background-color: var(--color-light-gray); /* Light background for contrast */
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Textarea specific height */
.profile-form__textarea {
    min-height: 80px;
    resize: vertical; /* Allow vertical resizing */
}

/* File Input (for profile pic) - using new class name */
.profile-form__file-input {
    display: block;
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 1rem;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background-color: var(--color-light-gray);
    font-size: 0.9rem;
    box-sizing: border-box;
    cursor: pointer;
    line-height: 1.2; /* Adjust line height for better display */
}
.profile-form__file-input::-webkit-file-upload-button {
    background: var(--color-secondary-button);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px; /* Smaller radius for inner button */
    cursor: pointer;
    margin-right: 15px;
    transition: background-color 0.2s ease;
}
.profile-form__file-input::-webkit-file-upload-button:hover {
    background: var(--color-secondary-button-hover);
}

/* Focus styles for inputs and textareas (using new class names) */
.profile-form__input:focus,
.profile-form__textarea:focus,
.profile-form__file-input:focus {
    outline: none;
    border-color: var(--color-focus-border);
    background-color: var(--color-white);
    box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.2); /* Subtle focus ring */
}

/* Current Profile Picture Display (using new class names) */
.profile-form__current-pic-info {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 5px;
    margin-bottom: 0.5rem; /* Space before image */
    font-weight: 500;
}
.profile-form__current-pic {
    display: block; /* Ensure it's a block for auto margins */
    max-width: 100px;
    max-height: 100px;
    border-radius: 50%; /* Make it round */
    object-fit: cover;
    margin: 0 auto 10px auto; /* Center the image */
    border: 2px solid var(--color-border-medium); /* Subtle border */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Slight shadow */
}

/* Checkbox for removing profile pic (using new class names) */
.profile-form__remove-pic-checkbox { /* This is the label for the checkbox */
    font-size: 0.9rem; /* Smaller font for checkbox label */
    color: var(--color-text-secondary);
    font-weight: 400; /* Lighter weight */
    margin-top: -0.5rem; /* Pull up slightly */
    margin-bottom: 1rem; /* Space below checkbox label */
}
.profile-form__remove-pic-checkbox input[type="checkbox"] {
    margin-right: 8px; /* Space between checkbox and text */
    vertical-align: middle; /* Align with text */
    transform: scale(1.1); /* Slightly larger checkbox */
}


/* Submit Button (using new class name) */
.profile-form__button {
    display: block; /* Make button full width if desired, or inline-block for fit-content */
    width: fit-content;
    margin: 1.5rem auto 0 auto; /* Center the button */
    background-color: var(--color-primary-button);
    color: var(--color-white);
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 16px; /* Consistent button radius */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow for buttons */
}
.profile-form__button:hover {
    background-color: var(--color-primary-button-hover);
    transform: translateY(-1px); /* Slight lift on hover */
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}
.profile-form__button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Form Message (success/error) (using new class name) */
.profile-form__message {
    margin-top: 1.5rem; /* More space above message */
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0; /* Hidden by default, JS will show */
    max-height: 0; /* Collapsed height */
    overflow: hidden; /* Hide overflow */
}
.profile-form__message.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green text */
    border: 1px solid #c3e6cb;
    opacity: 1;
    max-height: 100px; /* Allow height to expand */
    padding: 0.8rem;
}
.profile-form__message.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb;
    opacity: 1;
    max-height: 100px;
    padding: 0.8rem;
}

/* Optional: Style for 'saving' state if JS adds a 'saving' class */
.profile-form__message.saving {
    background-color: #e0f7fa; /* Light blue for saving */
    color: #007bff;
    border: 1px solid #b3e5fc;
    opacity: 1;
    max-height: 100px;
    padding: 0.8rem;
}