/* Rhino Rank DA/DR Checker Frontend Styles */

/* Critical styles with !important to ensure they work with optimizers */
.rrdc-checker-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

.rrdc-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.2;
}

.rrdc-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Form Section */
.rrdc-checker-form {
    margin-bottom: 40px;
}

.rrdc-form {
    width: 100%;
}

.rrdc-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

.rrdc-domain-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.rrdc-domain-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rrdc-submit-button {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: #2563eb;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px;
}

.rrdc-submit-button:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.rrdc-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading Spinner */
.rrdc-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.rrdc-spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.rrdc-spinner .path {
    stroke: #fff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Info Notice */
.rrdc-info-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: #6b7280;
}

.rrdc-info-icon {
    color: #2563eb;
    font-weight: 700;
    font-size: 16px;
}

.rrdc-info-text {
    line-height: 1.4;
}

/* Error Message */
.rrdc-error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #fee;
    border-radius: 6px;
    border: 1px solid #fcc;
}

/* Results Section */
.rrdc-results-container {
    animation: fadeIn 0.5s ease;
    position: relative;
}

/* Results Header */
.rrdc-results-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
}

.rrdc-results-info {
    font-size: 16px;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.rrdc-results-info strong {
    color: #1a1a1a;
    font-weight: 600;
}

.rrdc-separator {
    color: #d1d5db;
    font-weight: 300;
    display: inline-block;
}

.rrdc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rrdc-metric-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.rrdc-metric-card:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.rrdc-metric-label {
    font-size: 14px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.rrdc-metric-value {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 10px;
}

.rrdc-dr-card .rrdc-metric-value {
    color: #2563eb;
}

.rrdc-da-card .rrdc-metric-value {
    color: #10b981;
}

.rrdc-metric-provider {
    font-size: 12px;
    color: #9ca3af;
}

/* Additional Info */
.rrdc-additional-info {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.rrdc-domain-checked {
    margin-bottom: 5px;
}

.rrdc-domain-checked span {
    font-weight: 600;
    color: #1a1a1a;
}

/* Promo Section */
.rrdc-promo-section {
    margin-top: 60px;
    padding: 50px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    animation: fadeIn 0.8s ease;
}

.rrdc-promo-header {
    text-align: center;
    margin-bottom: 40px;
}

.rrdc-promo-header h3 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.rrdc-promo-header p {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
}

.rrdc-promo-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .rrdc-promo-features {
        grid-template-columns: 1fr;
    }
}

.rrdc-feature {
    display: flex;
    gap: 15px;
}

.rrdc-feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.rrdc-feature-icon svg {
    width: 24px;
    height: 24px;
}

/* CSS Icons */
.rrdc-icon-link::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: #2563eb;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'%3E%3C/path%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'%3E%3C/path%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'%3E%3C/path%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'%3E%3C/path%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
}

.rrdc-icon-chart::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background: #2563eb;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 6 13.5 15.5 8.5 10.5 1 18'%3E%3C/polyline%3E%3Cpolyline points='17 6 23 6 23 12'%3E%3C/polyline%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 6 13.5 15.5 8.5 10.5 1 18'%3E%3C/polyline%3E%3Cpolyline points='17 6 23 6 23 12'%3E%3C/polyline%3E%3C/svg%3E");
    mask-size: contain;
    -webkit-mask-size: contain;
}

.rrdc-feature-content h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 5px 0;
}

.rrdc-feature-content p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.rrdc-promo-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.rrdc-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.rrdc-cta-button svg {
    transition: transform 0.3s ease;
}

.rrdc-cta-button:hover svg {
    transform: translate(2px, -2px);
}

.rrdc-cta-primary {
    background-color: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.rrdc-cta-primary:hover {
    background-color: #000;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: #fff;
}

.rrdc-cta-secondary {
    background-color: #fff;
    color: #1a1a1a;
    border-color: #e5e7eb;
}

.rrdc-cta-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Scroll Indicator Arrow */
.rrdc-scroll-indicator {
    text-align: center;
    margin: 40px 0 20px;
    animation: fadeIn 0.8s ease;
}

.rrdc-arrow-down {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    position: relative;
    animation: bounceDown 2s ease-in-out infinite;
}

.rrdc-arrow-down::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 20px;
    height: 20px;
    border-right: 3px solid #2563eb;
    border-bottom: 3px solid #2563eb;
    transform: translateX(-50%) rotate(45deg);
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(10px);
    }
    60% {
        transform: translateY(5px);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CAPTCHA Styles */
.rrdc-captcha-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #2563eb;
    border-radius: 8px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.rrdc-captcha-inner {
    max-width: 300px;
    margin: 0 auto;
}

.rrdc-captcha-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
    text-align: center;
}

.rrdc-captcha-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rrdc-captcha-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 16px;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.rrdc-captcha-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.rrdc-captcha-refresh {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 20px;
    color: #6b7280;
    background: #fff;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rrdc-captcha-refresh:hover {
    color: #2563eb;
    border-color: #2563eb;
    transform: rotate(180deg);
}

.rrdc-captcha-info {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* Rate limit message styling */
.rrdc-error-message.rate-limited {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 640px) {
    .rrdc-title {
        font-size: 28px;
    }
    
    .rrdc-subtitle {
        font-size: 16px;
    }
    
    .rrdc-input-group {
        flex-direction: column;
    }
    
    .rrdc-submit-button {
        width: 100%;
    }
    
    .rrdc-promo-section {
        padding: 30px 20px;
    }
    
    .rrdc-promo-header h3 {
        font-size: 24px;
    }
    
    .rrdc-metric-value {
        font-size: 36px;
    }
}