/* Custom Password Change Styles */
.custom-password-change-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cpc-form {
    width: 100%;
}

.cpc-field-group {
    margin-bottom: 20px;
}

.cpc-field-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.cpc-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.cpc-input {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.cpc-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.cpc-toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.cpc-toggle-password:hover {
    opacity: 0.7;
}

.cpc-toggle-password:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.cpc-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.cpc-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cpc-submit-btn:hover {
    background-color: #005a87;
}

.cpc-submit-btn:active {
    transform: translateY(1px);
}

.cpc-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.cpc-messages {
    margin-bottom: 20px;
}

.cpc-message {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.cpc-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cpc-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.cpc-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Widget specific styles */
.widget .custom-password-change-container {
    padding: 20px;
    margin: 0;
    box-shadow: none;
}

/* Responsive design */
@media (max-width: 600px) {
    .custom-password-change-container {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .cpc-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading spinner */
.cpc-submit-btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.cpc-submit-btn.loading {
    position: relative;
    color: transparent;
}