/* 
 * Matrimonial My Profile - Mobile First CSS
 * File: assets/profile-style.css
 */

:root {
    --primary-color: #e63946;
    --secondary-color: #f1faee;
    --text-dark: #1d3557;
    --text-light: #457b9d;
    --border-color: #e0e0e0;
    --success-color: #2a9d8f;
    --error-color: #e63946;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
}

.profile-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    background: var(--bg-light);
    min-height: 100vh;
}

/* Profile Header Card */
.profile-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg);
    color: var(--white);
    position: relative;
}

.profile-photo-section {
    text-align: center;
    margin-bottom: 20px;
}

.profile-photo-wrapper {
    position: relative;
    display: inline-block;
}

.profile-photo,
.profile-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--white);
    box-shadow: var(--shadow);
}

.profile-photo-placeholder {
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.photo-upload-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--white);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.photo-upload-btn:hover {
    transform: scale(1.1);
    background: #d62839;
}

.delete-photo-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--white);
    border-radius: 20px;
    color: var(--white);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-photo-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.profile-header-info {
    text-align: center;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin: 10px 0 5px;
}

.profile-age-gender {
    font-size: 15px;
    opacity: 0.9;
    margin: 5px 0;
}

.profile-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 14px;
    opacity: 0.85;
    margin-top: 8px;
}

/* Visibility Toggle */
.visibility-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.visibility-label {
    font-size: 14px;
    font-weight: 500;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-color);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--white);
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tabs */
.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 20px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.tab-btn:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Card */
.profile-card {
    background: var(--white);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}

/* Profile Form */
.profile-form {
    width: 100%;
}

.form-row {
    margin-bottom: 15px;
}

.form-row.two-col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}


.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="tel"],
.profile-form input[type="date"],
.profile-form input[type="number"],
.profile-form select,
.profile-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: var(--white);
    color: var(--text-dark);
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.profile-form input:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.profile-form textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Buttons */
.btn-save,
.btn-logout {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-save {
    background: var(--primary-color);
    color: var(--white);
}

.btn-save:hover {
    background: #d62839;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.btn-save.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-save.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.btn-logout {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-logout:hover {
    background: var(--primary-color);
    color: var(--white);
}

.logout-section {
    margin-top: 30px;
}

/* Messages */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
    text-align: center;
}

.message.show {
    display: block;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.loading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Tablet Styles */
@media (min-width: 576px) {
    .profile-container {
        padding: 20px;
    }
    
    .profile-header-card {
        padding: 30px;
    }
    
    .profile-photo,
    .profile-photo-placeholder {
        width: 140px;
        height: 140px;
    }
    
    .profile-name {
        font-size: 28px;
    }
    
    .form-row.two-col {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 14px;
    }
}

/* Desktop Styles */
@media (min-width: 768px) {
    .profile-container {
        max-width: 900px;
        padding: 30px 20px;
    }
    
    .profile-header-card {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 35px;
    }
    
    .profile-photo-section {
        margin-bottom: 0;
        margin-right: 30px;
    }
    
    .profile-header-info {
        flex: 1;
        text-align: left;
    }
    
    .profile-location {
        justify-content: flex-start;
    }
    
    .visibility-toggle {
        justify-content: flex-start;
        margin-left: auto;
        padding-left: 30px;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        border-top: none;
        padding-top: 0;
        margin-top: 0;
        flex-direction: column;
    }
    
    .quick-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .stat-item {
        padding: 20px;
    }
    
    .stat-icon {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    .stat-value {
        font-size: 15px;
    }
    
    .profile-card {
        padding: 30px;
    }
    
    .card-title {
        font-size: 22px;
    }
}

/* Large Desktop */
@media (min-width: 992px) {
    .profile-container {
        max-width: 1000px;
    }
}

/* Print Styles */
@media print {
    .profile-container {
        background: white;
    }
    
    .profile-header-card {
        background: white;
        color: black;
        border: 1px solid #ccc;
    }
    
    .photo-upload-btn,
    .delete-photo-btn,
    .visibility-toggle,
    .profile-tabs,
    .btn-save,
    .btn-logout {
        display: none;
    }
    
    .tab-content {
        display: block !important;
    }
}