/* WordPress wrapper classes */
.main {
    padding-top: 78px !important;
}

.breadcrumbs-space {
    display: none !important;
}

.align.wp-block-account-edit-profile,
.wp-block-account-edit-profile {
    max-width: 1280px !important;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.account-edit-profile-block {
    max-width: 1280px;
    margin: 0 auto;
    background: transparent;
}

.account-layout {
    display: grid;
    grid-template-columns: 445px 1fr;
    gap: 64px;
    align-items: start;
    padding: 76px 0 80px 0;
}

@media screen and (max-width: 968px) {
    .account-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Sidebar */
.account-sidebar {
    position: sticky;
    top: 32px;
}

.account-sidebar-card {
    background: #fff !important;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 20px 24px 0 rgba(63, 50, 16, 0.10);
    backdrop-filter: blur(4px);
}

.account-profile-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 32px 24px;
    border-bottom: 1px solid #A2863E;
}

.account-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a2863e 0%, #8a6f33 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.account-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.account-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFF;
    font-family: "Playfair Display", serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 140%;
}

.account-profile-name-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-profile-name {
    color: #302C2C;
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 130%;
    margin: 0;
    padding: 0;
}

.account-join-date {
    color: #302C2C;
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
    margin: 0;
    padding: 0;
}

/* Menu */
.account-menu {
    display: flex;
    flex-direction: column;
    padding: 6px 24px 24px 24px;
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    color: #C1AE7E;
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
    border-bottom: 1px solid #F6F3EC;
    padding: 16px 0;
}

.account-menu-item:hover {
    color: #A2863E;
}

.account-menu-item.active {
    color: #A2863E;
    font-weight: 700;
}

.account-menu-icon {
    flex-shrink: 0;
    color: currentColor;
}

.account-menu-arrow {
    margin-left: auto;
    flex-shrink: 0;
    color: currentColor;
}

.account-menu-item:not(.active) .account-menu-arrow {
    display: none;
}

/* Logout Section */
.account-logout-section {
    margin-top: auto;
    padding: 8px 24px 24px 24px;
}

.account-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 64px;
    border: 2px solid #B59E65;
    background: #FFF;
    box-shadow: 0 0 14px 0 #FFF;
    color: #A2863E;
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
}

.account-logout-btn:hover {
    background: #a2863e;
    color: #fff;
}

.account-logout-arrow {
    flex-shrink: 0;
    color: currentColor;
}

/* Main Content */
.account-main-content {
    width: 100%;
}

.account-not-logged-in {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.account-not-logged-in p {
    color: #666;
    font-size: 1.1rem;
}

.account-form-title {
    color: #302C2C;
    font-family: "Playfair Display", serif;
    font-size: 32px;
    font-weight: 500;
    line-height: 120%;
    margin: 0 0 32px 0;
    padding: 0;
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media screen and (max-width: 768px) {
    .account-form-row {
        grid-template-columns: 1fr;
    }
}

.account-form-group .required {
    color: #dc3545;
}

/* Material Design Input Styles */
.account-material-input {
    position: relative;
    margin-bottom: 24px;
}

.account-input-wrapper {
    position: relative;
    width: 100%;
}

/* Password toggle button */
.account-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A2863E;
    transition: color 0.3s ease;
    z-index: 10;
    outline: none;
}

.account-password-toggle:hover {
    color: #8a6f33;
}

.account-password-toggle:focus,
.account-password-toggle:active {
    color: #A2863E;
    outline: none;
    border: none;
    box-shadow: none;
}

.account-eye-icon {
    width: 20px;
    height: 20px;
    display: block;
    transition: opacity 0.2s ease;
}

.account-eye-closed {
    display: none !important;
}

.account-password-toggle.active .account-eye-open {
    display: none !important;
}

.account-password-toggle.active .account-eye-closed {
    display: block !important;
}

/* Disable browser default password reveal (Firefox) */
.account-form-input[type="password"] {
    appearance: textfield;
    -moz-appearance: textfield;
    padding-right: 48px;
    /* Space for eye icon */
}

.account-form-input[type="text"][id*="password"] {
    padding-right: 48px;
    /* Space for eye icon when visible */
}

.account-form-input[type="password"]::-webkit-credentials-auto-fill-button {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    right: 0;
}

/* Add padding for password fields to make room for eye icon */
.account-material-input .account-input-wrapper .account-form-input[id*="password"] {
    padding-right: 48px;
}

.account-form-input {
    padding: 16px;
    border: 1px solid #A2863E;
    border-radius: 6px;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    background: #FFF;
    outline: none;
    color: #302C2C;
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
}

.account-form-input:focus {
    outline: none;
    border-bottom: 1px solid #A2863E;
}

.account-form-input:focus~.account-input-underline {
    display: none;
}

.account-form-input.error {
    border-color: #dc3545;
    border-bottom-color: #dc3545;
}

.account-form-input.error~.account-input-underline {
    background-color: #dc3545;
    width: 100%;
}

.account-material-label {
    position: absolute;
    left: 0.75rem;
    top: 1rem;
    font-size: 1rem;
    color: #999;
    font-weight: normal;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left top;
    background: transparent;
    padding: 0 0.25rem;
    margin-left: -0.25rem;
}

.account-form-input:focus~.account-material-label,
.account-form-input:not(:placeholder-shown)~.account-material-label {
    top: -0.5rem;
    left: 0;
    color: #A2863E;
    font-size: 12px;
    font-weight: 600;
    line-height: 150%;
    padding: 0 3px;
    margin-left: 14px;
    background: #ffffff;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 48%, rgba(246, 243, 236, 1) 52%);
}

.account-form-input:focus~.account-material-label .required,
.account-form-input:not(:placeholder-shown)~.account-material-label .required {
    color: #dc3545;
}

/* Error state - red label and border */
.account-form-input.error~.account-material-label,
.account-form-input.error:focus~.account-material-label,
.account-form-input.error:not(:placeholder-shown)~.account-material-label {
    color: #dc3545;
}

.account-form-input.error~.account-material-label .required,
.account-form-input.error:focus~.account-material-label .required,
.account-form-input.error:not(:placeholder-shown)~.account-material-label .required {
    color: #dc3545;
}

.account-input-underline {
    display: none;
    /* Hidden since we're using border instead */
}

.account-form-input:disabled {
    background: #FFF;
    cursor: not-allowed;
    opacity: 0.95;
}

.account-form-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #dc3545;
}

/* Select dropdown styling */
.account-form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23A2863E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
    padding-right: 40px;
    cursor: pointer;
}

.account-form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23A2863E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.account-form-select.error {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Select with value - move label up */
.account-form-select.has-value ~ .account-material-label,
.account-input-wrapper.has-value .account-material-label {
    top: -0.5rem;
    left: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 150%;
    padding: 0 3px;
    margin-left: 14px;
    background: #ffffff;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 48%, rgba(246, 243, 236, 1) 52%);
    color: #A2863E;
}

.account-form-select:focus ~ .account-material-label {
    top: -0.5rem;
    left: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 150%;
    padding: 0 3px;
    margin-left: 14px;
    background: #ffffff;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 48%, rgba(246, 243, 236, 1) 52%);
    color: #A2863E;
}

/* Textarea styling */
.account-form-textarea {
    resize: vertical;
    min-height: 100px;
    padding-top: 16px;
    padding-bottom: 16px;
    line-height: 1.5;
}

.account-form-textarea:focus ~ .account-material-label,
.account-form-textarea:not(:placeholder-shown) ~ .account-material-label {
    top: -0.5rem;
    left: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 150%;
    padding: 0 3px;
    margin-left: 14px;
    background: #ffffff;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 48%, rgba(246, 243, 236, 1) 52%);
}

/* Date input styling */
.account-form-input[type="date"] {
    position: relative;
    color-scheme: light;
    padding-right: 40px;
}

.account-form-input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    width: 20px;
    height: 20px;
    position: absolute;
    right: 8px;
    /* Menggunakan SVG mask untuk warna yang lebih tepat */
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2V4M14 2V4M3 6H17M4 4H16C16.5304 4 17.0391 4.21071 17.4142 4.58579C17.7893 4.96086 18 5.46957 18 6V16C18 16.5304 17.7893 17.0391 17.4142 17.4142C17.0391 17.7893 16.5304 18 16 18H4C3.46957 18 2.96086 17.7893 2.58579 17.4142C2.21071 17.0391 2 16.5304 2 16V6C2 5.46957 2.21071 4.96086 2.58579 4.58579C2.96086 4.21071 3.46957 4 4 4Z' stroke='%23A2863E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M2 10H18' stroke='%23A2863E' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    filter: none;
    transition: opacity 0.3s ease;
}

.account-form-input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 0.8;
}

/* Firefox date picker icon */
.account-form-input[type="date"]::-moz-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    width: 20px;
    height: 20px;
    filter: none;
}

.account-form-input[type="date"]:focus ~ .account-material-label,
.account-form-input[type="date"]:not(:placeholder-shown) ~ .account-material-label,
.account-form-input[type="date"]:valid ~ .account-material-label {
    top: -0.5rem;
    left: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 150%;
    padding: 0 3px;
    margin-left: 14px;
    background: #ffffff;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 48%, rgba(246, 243, 236, 1) 52%);
}

.account-form-help {
    font-size: 0.85rem;
    color: #666;
    margin-top: -0.25rem;
}

.account-form-section {
    padding-top: 24px;
    border-top: 2px solid #a2863e63;
}

.account-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #302C2C;
    margin-bottom: 24px;
    margin-top: 0;
    padding: 0;
}

.account-section-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.account-form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 6px;
}

.account-cancel-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 64px;
    border: 2px solid #B59E65;
    background: #FFF;
    padding: 12px 24px;
    color: #A2863E;
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
    text-align: center;
    min-width: 180px;
}

.account-cancel-btn:hover {
    background: #A2863E;
    color: #FFF;
}

.account-submit-btn {
    padding: 12px 24px;
    background: #a2863e;
    color: #FFF;
    border: 2px solid #a2863e;
    border-radius: 64px;
    font-size: 16px;
    font-weight: 500;
    line-height: 150%;
    cursor: pointer;
    transition: background 0.3s ease;
    min-width: 180px;
    text-align: center;
}

.account-submit-btn:hover:not(:disabled) {
    background: #8a6f33;
}

.account-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.account-error-message {
    color: #dc3545;
    font-size: 0.85rem;
    display: none;
    margin-top: -0.5rem;
}

.account-error-message.show {
    display: block;
}

.account-form-message {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
    display: none;
    text-align: center;
    font-weight: 500;
}

.account-form-message.show {
    display: block;
}

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

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

.account-form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading state */
.account-submit-btn.loading {
    position: relative;
    color: transparent;
}

.account-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .account-edit-profile-block {
        padding: 1rem;
    }

    .account-sidebar-card,
    .account-main-content {
        padding: 1.5rem;
    }

    .account-form-actions {
        flex-direction: column;
    }

    .account-cancel-btn,
    .account-submit-btn {
        width: 100%;
    }
}

/* Dark Mode Support */
.dark-mode .account-material-label {
    color: #999;
}

.dark-mode .account-form-input:focus~.account-material-label,
.dark-mode .account-form-input:not(:placeholder-shown)~.account-material-label {
    background: linear-gradient(0deg, rgba(30, 30, 30, 1) 48%, rgba(40, 40, 40, 1) 52%);
}

.dark-mode .account-form-input {
    background: #1e1e1e;
    border-color: #A2863E;
    color: #fff;
}

.dark-mode .account-form-input:focus {
    border-color: #A2863E;
}

.dark-mode .account-form-input:disabled {
    background: #2a2a2a;
    color: #999;
}

.dark-mode .account-form-help {
    color: #999;
}

.dark-mode .account-form-title {
    color: #fff;
}

.dark-mode .account-section-title {
    color: #fff;
}

.dark-mode .account-section-description {
    color: #ccc;
}