/**
 * AI Bridge Downloader - Frontend Styles
 * Version: 1.0.0
 * Powered by AI Bridge Inc. - https://aibridge.jp/
 */

.abd-download-form {
    max-width: 480px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: "Noto Sans JP", sans-serif;
}

.abd-form-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.abd-form-header h3 {
    margin: 0 0 10px;
    font-size: 24px;
    color: #2c3e50;
}

.abd-file-name {
    font-size: 16px;
    font-weight: 600;
    color: #2980b9;
    margin: 0 0 5px;
}

.abd-file-desc {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.abd-step {
    display: none;
}

.abd-step.active {
    display: block;
}

.abd-step > p {
    margin: 0 0 15px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

.abd-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.abd-input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    outline: none;
}

.abd-input-group input:focus {
    border-color: #2980b9;
}

.abd-input-group input::placeholder {
    color: #aaa;
}

.abd-btn {
    padding: 12px 24px;
    background: #2980b9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    white-space: nowrap;
}

.abd-btn:hover {
    background: #2471a3;
    transform: translateY(-1px);
}

.abd-btn:active {
    transform: translateY(0);
}

.abd-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.abd-btn-download {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    background: #27ae60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.abd-btn-download:hover {
    background: #229954;
}

.abd-btn-download .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.abd-message {
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.abd-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.abd-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.abd-resend {
    margin: 10px 0 0;
    font-size: 13px;
    text-align: center;
}

.abd-resend-link {
    color: #2980b9;
    text-decoration: none;
}

.abd-resend-link:hover {
    text-decoration: underline;
}

.abd-success {
    text-align: center;
    font-size: 16px;
    color: #27ae60;
    font-weight: 600;
    margin-bottom: 20px !important;
}

/* Loading state */
.abd-btn.loading {
    position: relative;
    color: transparent;
}

.abd-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: abd-spin 0.8s linear infinite;
}

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

/* Code input styling */
.abd-code-input {
    text-align: center;
    font-size: 24px !important;
    letter-spacing: 8px;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 480px) {
    .abd-download-form {
        padding: 20px;
        margin: 0 15px;
    }

    .abd-input-group {
        flex-direction: column;
    }

    .abd-btn {
        width: 100%;
    }
}

/* Credit footer (do not remove) */
.abd-download-form::after {
    content: "Powered by AI Bridge Downloader";
    display: block;
    text-align: center;
    font-size: 11px;
    color: #aaa;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
