/**
 * Frontend Styles for Suno Music Generator
 */

/* Credit Balance Display */
.smg-credit-balance-dashboard {
    background: #f7f7f7;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.smg-credit-balance-dashboard h3 {
    margin-top: 0;
    color: #333;
}

.smg-credit-amount {
    font-size: 18px;
    margin: 15px 0;
}

.smg-credit-amount strong {
    font-size: 32px;
    color: #0073aa;
}

/* Generate Music Form */
.smg-generate-wrapper {
    max-width: 800px;
}

.smg-credit-balance {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.smg-credit-balance h3 {
    margin: 0 0 15px 0;
    color: white;
}

.smg-credits-display {
    margin: 15px 0;
}

.smg-credits-number {
    font-size: 48px;
    font-weight: bold;
    display: block;
    line-height: 1;
}

.smg-credits-label {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.smg-no-credits {
    margin-top: 15px;
}

/* Generation Form */
.smg-generation-form {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
}

.smg-generation-form h3 {
    margin-top: 0;
    color: #333;
}

.smg-form-group {
    margin-bottom: 20px;
}

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

.smg-input,
.smg-textarea,
.smg-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.smg-input:focus,
.smg-textarea:focus,
.smg-select:focus {
    outline: none;
    border-color: #667eea;
}

.smg-textarea {
    resize: vertical;
    font-family: inherit;
}

.smg-description {
    font-size: 13px;
    color: #3a3a3a;
    margin-top: 5px;
    font-weight: 500;
}

.smg-custom-fields {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
}

.smg-generate-btn {
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.smg-generate-btn:hover {
    background: #5568d3;
}

.smg-generate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Generation Status */
.smg-generation-status {
    text-align: center;
    padding: 30px;
}

.smg-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.smg-status-message {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 600;
}

/* Generations List */
.smg-generations-list {
    display: grid;
    gap: 20px;
}

.smg-generation-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s;
}

.smg-generation-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.smg-generation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.smg-generation-title {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.smg-generation-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.smg-status-complete {
    background: #d4edda;
    color: #155724;
}

.smg-status-processing,
.smg-status-pending {
    background: #fff3cd;
    color: #856404;
}

.smg-status-failed {
    background: #f8d7da;
    color: #721c24;
}

.smg-generation-prompt {
    color: #1a1a1a;
    line-height: 1.6;
    margin-bottom: 15px;
    font-weight: 500;
}

.smg-generation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 13px;
}

.smg-meta-item {
    color: #2d2d2d;
    font-weight: 600;
}

/* Audio Player */
.smg-generation-player {
    margin-top: 20px;
}

.smg-generation-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.smg-audio-player {
    width: 100%;
    margin-bottom: 15px;
}

.smg-generation-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.smg-download-btn,
.smg-delete-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.smg-download-btn {
    background: #667eea;
    color: white;
}

.smg-download-btn:hover {
    background: #5568d3;
}

/* Credits Page */
.smg-credits-wrapper {
    max-width: 900px;
}

.smg-credits-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.smg-credits-balance {
    margin-bottom: 25px;
}

.smg-credits-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.smg-credits-info {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.smg-credits-info h4 {
    margin-top: 0;
}

.smg-credits-info ul {
    list-style: none;
    padding: 0;
}

.smg-credits-info ul li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
}

.smg-credits-info ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Transactions Table */
.smg-transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.smg-transactions-table th,
.smg-transactions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.smg-transactions-table th {
    background: #f7f7f7;
    font-weight: 600;
}

.smg-transaction-amount.positive {
    color: #28a745;
    font-weight: 600;
}

.smg-transaction-amount.negative {
    color: #dc3545;
    font-weight: 600;
}

/* Shortcode Styles */
.smg-shortcode-generate {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.smg-generations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.smg-generation-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.smg-generation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.smg-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.smg-card-content {
    padding: 20px;
}

.smg-card-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.smg-card-prompt {
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.smg-card-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 12px;
}

.smg-card-player {
    margin: 15px 0;
}

.smg-card-date {
    font-size: 12px;
    color: #4a4a4a;
    margin-top: 15px;
    font-weight: 600;
}

/* Pagination */
.smg-pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.smg-pagination a {
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.smg-pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.smg-pagination a.current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .smg-generations-grid {
        grid-template-columns: 1fr;
    }
    
    .smg-generation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .smg-generation-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .smg-credits-actions {
        flex-direction: column;
    }
}

/* Messages */
.smg-success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.smg-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.smg-notice {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.smg-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Enhanced text visibility for user interface */
.smg-card-processing {
    color: #d35400;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.smg-no-generations {
    text-align: center;
    padding: 40px 20px;
    color: #2d2d2d;
    font-size: 16px;
    font-weight: 600;
}

.smg-card-type {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smg-card-actions {
    margin: 15px 0;
}

.smg-btn-download {
    display: inline-block;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.smg-btn-download:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.smg-credit-display {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.smg-credit-display p {
    color: #1a1a1a;
    font-weight: 700;
    margin: 0;
}

.smg-credit-display strong {
    color: #667eea;
    font-size: 18px;
}
