/**
 * Website Downloader - Quick Download Styles
 * 
 * Styles for the guest quick download widget.
 * Basic functional styles for MVP.
 */

/* Container */
.wd-quick-download {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    text-align: center;
}

/* Header */
.wd-quick-header {
    margin-bottom: 30px;
}

.wd-quick-header h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
}

.wd-quick-subtitle {
    margin: 0;
    font-size: 16px;
    color: #666;
}

/* Form */
.wd-quick-form {
    margin-bottom: 20px;
}

.wd-quick-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 500px) {
    .wd-quick-input-group {
        flex-direction: row;
    }
}

.wd-quick-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wd-quick-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.wd-quick-input:disabled {
    background: #f5f5f5;
    color: #999;
}

.wd-quick-button {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.wd-quick-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.wd-quick-button:active:not(:disabled) {
    transform: translateY(0);
}

.wd-quick-button:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wd-quick-button-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wd-quick-button-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wd-spin 0.8s linear infinite;
}

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

/* Messages */
.wd-quick-messages {
    margin: 20px 0;
}

.wd-quick-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.wd-quick-message-info {
    background: #e8f4fc;
    color: #0073aa;
    border: 1px solid #b8daec;
}

.wd-quick-message-error {
    background: #fef0f0;
    color: #c00;
    border: 1px solid #f5c6c6;
}

/* Result (Success) */
.wd-quick-result {
    padding: 30px;
    background: #f0f9f0;
    border: 1px solid #c6e6c6;
    border-radius: 12px;
}

.wd-quick-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #2e7d32;
}

.wd-quick-checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    font-size: 16px;
}

.wd-quick-download-btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wd-quick-download-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

/* Upsell */
.wd-quick-upsell {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #c6e6c6;
}

.wd-quick-upsell p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #666;
}

.wd-quick-signup-link {
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
}

.wd-quick-signup-link:hover {
    text-decoration: underline;
}

/* Error */
.wd-quick-error {
    padding: 30px;
    background: #fef0f0;
    border: 1px solid #f5c6c6;
    border-radius: 12px;
    text-align: center;
}

.wd-quick-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
    background: #c00;
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
}

#wd-quick-error-text {
    display: block;
    margin-bottom: 20px;
    font-size: 14px;
    color: #721c24;
}

.wd-quick-retry-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.wd-quick-retry-btn:hover {
    background: #0073aa;
    color: #fff;
}

/* Responsive */
@media (max-width: 500px) {
    .wd-quick-download {
        padding: 20px 15px;
        margin: 20px auto;
    }

    .wd-quick-header h2 {
        font-size: 22px;
    }

    .wd-quick-subtitle {
        font-size: 14px;
    }

    .wd-quick-input,
    .wd-quick-button {
        padding: 12px 14px;
        font-size: 15px;
    }

    .wd-quick-result,
    .wd-quick-error {
        padding: 20px;
    }
}

/* Form container */
.wd-quick-form-container {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wd-quick-form-container h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #1a1a1a;
}

.wd-quick-form-container > p {
    margin: 0 0 20px;
    color: #666;
}

/* URL Input */
#wd-quick-url {
    flex: 1;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#wd-quick-url:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

#wd-quick-url:disabled {
    background: #f5f5f5;
    color: #999;
}

/* Buttons */
.wd-btn {
    display: inline-block;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.wd-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
}

.wd-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.wd-btn-success {
    color: #fff;
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
}

.wd-btn-success:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.wd-btn-secondary {
    color: #0073aa;
    background: #fff;
    border: 2px solid #0073aa;
}

.wd-btn-secondary:hover {
    background: #0073aa;
    color: #fff;
}

.wd-btn:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Inline spinner */
.wd-spinner-inline {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wd-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

/* Success message */
.wd-quick-success-message {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 600;
    color: #2e7d32;
}

/* Error icon as text emoji */
.wd-quick-error-icon {
    font-size: 32px;
    margin: 0 0 10px;
}

/* Upsell section */
.wd-quick-upsell {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.wd-quick-upsell p {
    margin: 0 0 5px;
    font-size: 14px;
    color: #666;
}

.wd-quick-upsell a {
    font-size: 14px;
    font-weight: 600;
    color: #0073aa;
    text-decoration: none;
}

.wd-quick-upsell a:hover {
    text-decoration: underline;
}
