/**
 * Frontend CSS for Codesign Category Protector
 */

/* Password Form Styles */
.ccp-password-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ccp-form-group {
    margin-bottom: 20px;
}

.ccp-form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.ccp-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.ccp-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ccp-form-input:invalid {
    border-color: #ef4444;
}

/* .ccp-submit-button {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ccp-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
} */

.ccp-submit-button:active {
    transform: translateY(0);
}

.ccp-submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Purchase Section Styles */
.ccp-purchase-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.ccp-purchase-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ccp-purchase-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.ccp-purchase-text h3 {
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ccp-purchase-text p {
    color: #6b7280;
    margin-bottom: 15px;
    line-height: 1.6;
}

.ccp-purchase-button, .ccp-submit-button {
    background: linear-gradient(270deg, #F1CD6D 0%, #C48341 52.25%, #F1CD6D 100%) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 18px !important;
    color: #000000 !important;
    border-style: none !important;
    border-radius: 50px 50px 50px 50px !important;
    font-family: "Inter", Sans-serif !important;
    height: 50px !important;
    width: auto !important;
    outline: none !important;
    box-shadow: none !important;
    border: 0 none !important;
    box-sizing: border-box;
    padding: 16px 30px;
}

.ccp-purchase-button:hover, .ccp-submit-button:hover {
	background: linear-gradient(270deg, #F1CD6D 0%, #F1CD6D 52.25%, #F1CD6D 100%) !important;
}

.ccp-purchase-button:active {
    transform: translateY(0);
}

/* Error and Success Messages */
.ccp-error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    font-weight: 500;
}

.ccp-success-message {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #bbf7d0;
    font-weight: 500;
}

/* Access Status Widget */
.ccp-access-status-widget {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.ccp-status-header h4 {
    margin: 0 0 15px 0;
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.ccp-status-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 6px;
}

.ccp-access-granted {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
}

.ccp-access-denied {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
}

.ccp-status-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.ccp-status-text {
    flex-grow: 1;
    font-weight: 500;
}

.ccp-clear-session {
    background: #6b7280;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ccp-clear-session:hover {
    background: #4b5563;
}

.ccp-enter-password {
    background: #3b82f6;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.ccp-enter-password:hover {
    background: #2563eb;
    color: white;
    text-decoration: none;
}

/* Protection Notice */
.ccp-protection-notice {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
}

.ccp-notice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ccp-notice-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.ccp-notice-text h3 {
    color: #92400e;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ccp-notice-text p {
    color: #a16207;
    margin-bottom: 15px;
    line-height: 1.6;
}

.ccp-notice-button {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.ccp-notice-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
    color: white;
    text-decoration: none;
}

/* Back Link */
.ccp-back-link {
    text-align: center;
    margin-top: 20px;
}

.ccp-back-link a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.ccp-back-link a:hover {
    color: #374151;
}

/* Loading States */
.ccp-submit-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ccp-submit-button.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: ccp-spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes ccp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Password Strength Indicator */
.ccp-password-strength-indicator {
    margin-top: 10px;
}

.ccp-password-strength-bar {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.ccp-password-strength-text {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ccp-password-form {
        padding: 20px;
        margin: 10px auto;
    }
    
    .ccp-purchase-content,
    .ccp-notice-content {
        flex-direction: column;
        text-align: center;
    }
    
    .ccp-purchase-icon,
    .ccp-notice-icon {
        font-size: 2em;
    }
    
    .ccp-status-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .ccp-form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media (max-width: 480px) {
    .ccp-password-form {
        padding: 15px;
    }
    
    .ccp-purchase-section,
    .ccp-protection-notice {
        padding: 20px 15px;
    }
    
    .ccp-submit-button,
    .ccp-purchase-button,
    .ccp-notice-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ccp-password-form {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .ccp-form-input {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .ccp-form-input:focus {
        border-color: #3b82f6;
    }
    
    .ccp-form-label {
        color: #d1d5db;
    }
    
    .ccp-access-status-widget {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .ccp-status-header h4 {
        color: #f9fafb;
    }
}

/* Print styles */
@media print {
    .ccp-password-form,
    .ccp-purchase-section,
    .ccp-access-status-widget,
    .ccp-protection-notice {
        display: none;
    }
} 