/* Certificate Countdown Scanner - Frontend Styles */

/* Reset and Base Styles */
.ccs-scanner-wrapper {
    max-width: 900px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

.ccs-scanner-wrapper * {
    box-sizing: border-box;
}

/* Header */
.ccs-header {
    text-align: center;
    margin-bottom: 40px;
}

.ccs-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.ccs-subtitle {
    font-size: 18px;
    color: #4a5568;
    margin: 0;
    font-weight: 400;
}

/* Steps */
.ccs-step {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    padding: 40px;
    transition: opacity 0.3s ease;
}

.ccs-step:not(.ccs-step-active) {
    display: none;
}

/* Form Sections */
.ccs-form-section {
    margin-bottom: 32px;
}

.ccs-label {
    display: block;
    margin-bottom: 8px;
}

.ccs-label-text {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.ccs-label-description {
    display: block;
    font-size: 14px;
    color: #718096;
    font-weight: 400;
}

/* Inputs */
.ccs-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #ffffff;
}

.ccs-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.ccs-input::placeholder {
    color: #a0aec0;
}

/* Domain Input Groups */
#ccs-domains-container {
    margin-bottom: 16px;
}

.ccs-domain-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.ccs-domain-input {
    flex: 1;
}

.ccs-btn-remove-domain {
    width: 40px;
    height: 44px;
    background: #fc8181;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.ccs-btn-remove-domain:hover {
    background: #f56565;
}

.ccs-btn-remove-domain:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
}

/* Form Row/Columns */
.ccs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {
    .ccs-form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.ccs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.ccs-btn-primary {
    background: #4299e1;
    color: #ffffff;
}

.ccs-btn-primary:hover:not(:disabled) {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.4);
}

.ccs-btn-secondary {
    background: #edf2f7;
    color: #2d3748;
}

.ccs-btn-secondary:hover:not(:disabled) {
    background: #e2e8f0;
}

.ccs-btn-icon {
    font-size: 20px;
    line-height: 1;
}

.ccs-btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Spinner */
.ccs-spinner {
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: ccs-spin 0.8s linear infinite;
}

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

/* Form Actions */
.ccs-form-actions {
    text-align: center;
    margin-top: 32px;
}

.ccs-form-actions .ccs-btn {
    min-width: 240px;
}

/* Risk Card */
.ccs-risk-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #ffffff;
    margin-bottom: 32px;
}

.ccs-risk-icon {
    font-size: 48px;
    line-height: 1;
}

.ccs-risk-content {
    flex: 1;
}

.ccs-risk-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.ccs-risk-score {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.ccs-risk-score-max {
    font-size: 18px;
    opacity: 0.8;
}

/* Stats Grid */
.ccs-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.ccs-stat-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ccs-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.ccs-stat-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* Deadline Alert */
.ccs-deadline-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff5f5;
    border: 2px solid #feb2b2;
    border-radius: 8px;
    margin-bottom: 32px;
}

.ccs-deadline-icon {
    font-size: 32px;
    line-height: 1;
}

.ccs-deadline-content {
    flex: 1;
}

.ccs-deadline-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #742a2a;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ccs-deadline-info {
    font-size: 16px;
    color: #2d3748;
}

/* CTA Section */
.ccs-cta-section {
    background: #f7fafc;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 24px;
}

.ccs-cta-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 12px 0;
    text-align: center;
}

.ccs-cta-description {
    font-size: 16px;
    color: #4a5568;
    text-align: center;
    margin: 0 0 16px 0;
}

.ccs-cta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.ccs-cta-list li {
    font-size: 15px;
    color: #2d3748;
    padding: 8px 0;
}

/* Email Form */
.ccs-email-form {
    margin-top: 24px;
}

.ccs-email-input-group {
    display: flex;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .ccs-email-input-group {
        flex-direction: column;
    }
}

.ccs-email-input-group .ccs-input {
    flex: 1;
}

.ccs-email-input-group .ccs-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Actions */
.ccs-actions {
    text-align: center;
    margin-top: 24px;
}

/* Success Message */
.ccs-success-message {
    text-align: center;
    padding: 40px 20px;
}

.ccs-success-icon {
    font-size: 72px;
    margin-bottom: 24px;
}

.ccs-success-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 16px 0;
}

.ccs-success-text {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 32px auto;
}

/* Error Message */
.ccs-error-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 8px;
    margin-bottom: 24px;
    animation: ccs-slide-down 0.3s ease;
}

@keyframes ccs-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ccs-error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.ccs-error-icon {
    font-size: 24px;
    line-height: 1;
}

.ccs-error-text {
    font-size: 15px;
    color: #742a2a;
    font-weight: 500;
}

.ccs-error-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #742a2a;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.ccs-error-close:hover {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .ccs-scanner-wrapper {
        margin: 20px auto;
    }
    
    .ccs-step {
        padding: 24px;
    }
    
    .ccs-title {
        font-size: 24px;
    }
    
    .ccs-subtitle {
        font-size: 16px;
    }
    
    .ccs-risk-card {
        flex-direction: column;
        text-align: center;
    }
    
    .ccs-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ccs-deadline-alert {
        flex-direction: column;
        text-align: center;
    }
}
