/* css/buyer-profile.css */

/* Rice Farmers Association Theme */
:root {
    --primary-brown: #8B4513;        /* Saddle Brown - Rice field color */
    --secondary-gold: #d4a017;        /* Golden Rice color */
    --light-beige: #f5e9d5;          /* Light rice/beige */
    --dark-green: #2d5016;           /* Rice plant green */
    --light-green: #8db600;          /* Fresh rice color */
    --earth-brown: #a0522d;          /* Soil color */
    --cream-white: #fffaf0;          /* Rice grain color */
}

body {
    font-family: "Poppins", sans-serif;
    background-color: #f8f9fa;
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), 
                      url('../assets/rice-pattern.png');
    background-size: cover;
    background-attachment: fixed;
}

/* Custom brown background class */
.bg-brown {
    background-color: var(--primary-brown) !important;
    color: white !important;
}

.btn-brown {
    background-color: var(--primary-brown) !important;
    border-color: var(--primary-brown) !important;
    color: white !important;
}

.btn-brown:hover {
    background-color: var(--earth-brown) !important;
    border-color: var(--earth-brown) !important;
}

.text-brown {
    color: var(--primary-brown) !important;
}

/* Navbar - Rice Theme */
.navbar-rice {
    background: linear-gradient(135deg, var(--primary-brown), var(--dark-green)) !important;
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.2);
    border-bottom: 3px solid var(--secondary-gold);
}

.rice-logo {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--secondary-gold);
    background-color: white;
    padding: 5px;
}

.navbar-brand span {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-link {
    color: white !important;
    font-weight: 500;
    padding: 8px 15px !important;
    margin: 0 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.nav-link:hover {
    background-color: rgba(212, 160, 23, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-link.active {
    background-color: var(--secondary-gold);
    color: #000 !important;
    font-weight: 600;
}

/* Profile Icon */
.profile-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-gold), var(--light-green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 2px solid white;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

.profile-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(212, 160, 23, 0.5);
}

.profile-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.2);
    margin-top: 10px;
    border-top: 3px solid var(--secondary-gold);
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.dropdown-item:hover {
    background: linear-gradient(to right, var(--secondary-gold), var(--light-green));
    color: white !important;
    transform: translateX(5px);
}

.user-info {
    padding: 15px 20px;
    background: linear-gradient(to right, var(--light-beige), #fff);
    border-radius: 10px 10px 0 0;
}

.user-name {
    margin: 0;
    font-weight: 700;
    color: var(--primary-brown);
    font-family: 'Montserrat', sans-serif;
}

/* Profile Container */
.profile-container {
    margin-top: 30px;
    margin-bottom: 50px;
}

.profile-sidebar {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.1);
    text-align: center;
    height: 100%;
    border: 1px solid var(--light-beige);
    background: linear-gradient(180deg, white 0%, var(--cream-white) 100%);
}

.profile-main {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.1);
    height: 100%;
    border: 1px solid var(--light-beige);
    background: linear-gradient(180deg, white 0%, var(--cream-white) 100%);
}

/* Profile Picture */
.profile-picture-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.profile-picture {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-gold);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.2);
    background: linear-gradient(45deg, var(--light-beige), white);
}

.profile-picture-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--secondary-gold);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.profile-picture-overlay:hover {
    background: var(--primary-brown);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(212, 160, 23, 0.5);
}

.profile-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-brown);
    margin-top: 20px;
    margin-bottom: 5px;
}

.profile-role {
    color: var(--earth-brown);
    font-size: 0.95rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.member-since {
    color: var(--earth-brown);
    font-size: 0.85rem;
    margin-bottom: 30px;
    background: var(--light-beige);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* Stats Section */
.sidebar-stats {
    margin-top: 30px;
    border-top: 2px dashed var(--light-beige);
    padding-top: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-beige);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background-color: rgba(245, 233, 213, 0.3);
    padding-left: 10px;
    border-radius: 5px;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--primary-brown);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    color: var(--dark-green);
    font-size: 1rem;
}

/* Section Titles */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-brown);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-gold);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background-color: var(--light-green);
}

/* Info Items */
.info-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-beige);
    transition: all 0.3s ease;
}

.info-item:hover {
    border-bottom-color: var(--secondary-gold);
    padding-left: 5px;
}

.info-label {
    color: var(--earth-brown);
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: var(--primary-brown);
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
}

/* Buttons */
.edit-btn {
    background: none;
    border: none;
    color: var(--secondary-gold);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s;
    text-decoration: none;
    display: inline-block;
    margin-top: 5px;
    font-weight: 500;
}

.edit-btn:hover {
    color: var(--primary-brown);
    text-decoration: underline;
}

.info-input {
    border: 1px solid var(--light-beige);
    border-radius: 8px;
    padding: 10px 15px;
    width: 100%;
    transition: all 0.3s;
    font-family: "Poppins", sans-serif;
    background-color: #fff;
}

.info-input:focus {
    border-color: var(--secondary-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.2);
}

.save-btn {
    background: linear-gradient(135deg, var(--secondary-gold), var(--light-green));
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.save-btn:hover {
    background: linear-gradient(135deg, var(--primary-brown), var(--dark-green));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.cancel-btn {
    background-color: var(--light-beige);
    color: var(--earth-brown);
    border: 1px solid var(--light-beige);
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.cancel-btn:hover {
    background-color: #e8dcc7;
    border-color: var(--secondary-gold);
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--light-green);
    background-color: rgba(141, 182, 0, 0.1);
}

.alert-danger {
    border-left-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

/* Profile Actions */
.profile-actions {
    margin-top: 30px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid var(--secondary-gold);
    border-radius: 10px;
    background: white;
    color: var(--primary-brown);
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
}

.action-btn i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--secondary-gold), var(--light-green));
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(212, 160, 23, 0.3);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
}

.bg-success {
    background-color: var(--light-green) !important;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.2);
    border: 2px solid var(--secondary-gold);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-brown), var(--dark-green));
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
    font-family: 'Playfair Display', serif;
}

.modal-title {
    font-weight: 700;
}

.preview-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 20px auto;
    display: block;
    border: 3px solid var(--secondary-gold);
    background: linear-gradient(45deg, var(--light-beige), white);
}

.file-input {
    padding: 10px;
    border: 2px dashed var(--light-beige);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
    background-color: #fff;
}

.file-input:hover {
    border-color: var(--secondary-gold);
    background-color: rgba(212, 160, 23, 0.05);
}

.file-input input[type="file"] {
    display: none;
}

/* Rice-themed badges */
.badge.bg-brown {
    background: linear-gradient(135deg, var(--primary-brown), var(--earth-brown)) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .profile-picture-container {
        width: 150px;
        height: 150px;
    }
    
    .profile-name {
        font-size: 1.5rem;
    }
    
    .navbar-brand span {
        font-size: 1.1rem;
    }
    
    .nav-link {
        padding: 8px 10px !important;
        margin: 0 2px;
    }
}

@media (max-width: 576px) {
    .profile-sidebar,
    .profile-main {
        padding: 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .save-btn,
    .cancel-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-beige);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-brown);
}