/* AI Beer Label Maker Plugin Styles */
.ablm-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e1e1;
}

.ablm-header {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 30px;
    text-align: center;
}

.ablm-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ablm-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.ablm-form {
    padding: 30px;
}

.ablm-form-group {
    margin-bottom: 25px;
}

.ablm-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.1em;
}

.ablm-form-group select,
.ablm-form-group input[type="text"],
.ablm-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.ablm-form-group select:focus,
.ablm-form-group input[type="text"]:focus,
.ablm-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ablm-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.ablm-size-info {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 8px;
    font-size: 0.9em;
    color: #666;
    border-left: 4px solid #667eea;
}

.ablm-generate-btn {
    width: 100%;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.3);
    position: relative;
    overflow: hidden;
}

.ablm-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
}

.ablm-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ablm-spinner {
    display: inline-block;
    animation: spin 1s linear infinite;
}

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

.ablm-results {
    padding: 30px;
    border-top: 1px solid #e1e1e1;
    background: #fafafa;
}

.ablm-results h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
    text-align: center;
}

.ablm-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.ablm-image-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.ablm-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.ablm-image-item img {
    width: 100%;
    height: auto;
    display: block;
}

.ablm-image-info {
    padding: 15px;
    text-align: center;
}

.ablm-download-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.ablm-download-btn:hover {
    background: #218838;
}

.ablm-download-section {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    color: #666;
}

.ablm-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #f5c6cb;
}

.ablm-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #c3e6cb;
}

/* Loading overlay */
.ablm-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.ablm-loading-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ablm-loading-spinner {
    font-size: 3em;
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

.ablm-loading-text {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

.ablm-loading-subtext {
    color: #666;
    font-size: 0.9em;
}

/* Responsive design */
@media (max-width: 768px) {
    .ablm-container {
        margin: 10px;
        border-radius: 10px;
    }
    
    .ablm-header {
        padding: 20px;
    }
    
    .ablm-header h2 {
        font-size: 1.8em;
    }
    
    .ablm-form {
        padding: 20px;
    }
    
    .ablm-results {
        padding: 20px;
    }
    
    .ablm-images-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .ablm-images-grid {
        grid-template-columns: 1fr;
    }
    
    .ablm-form-group select,
    .ablm-form-group input[type="text"],
    .ablm-form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Admin page styles */
.ablm-admin-page {
    max-width: 800px;
}

.ablm-admin-page .form-table th {
    width: 200px;
}

#api-test-result {
    margin-top: 10px;
}

#api-test-result .notice {
    margin: 10px 0;
    padding: 12px;
}