/**
 * Rocketship SEO Reviews Admin Styles
 * 
 * @package Rocketship_Seo
 * @since 1.0.0
 */

/* ==========================================================================
   GOOGLE REVIEWS ADMIN PAGE STYLES
   ========================================================================== */

/* Admin Grid Layout */
.rocketship-admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.rocketship-admin-card {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.rocketship-admin-card.full-width {
    grid-column: 1 / -1;
}

.rocketship-admin-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #23282d;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rocketship-admin-card p {
    margin-bottom: 15px;
    color: #646970;
    font-size: 14px;
    line-height: 1.5;
}

/* Settings Form Styling to match existing pattern */
.rocketship-reviews-settings .form-table {
    background: #fff;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.rocketship-reviews-settings .form-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 20px 25px;
    vertical-align: top;
    width: 220px;
    position: relative;
}

.rocketship-reviews-settings .form-table th::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.rocketship-reviews-settings .form-table td {
    padding: 25px;
    border-bottom: 1px solid #f1f1f1;
    vertical-align: top;
    background: #fff;
    position: relative;
}

.rocketship-reviews-settings .form-table tr:hover td {
    background: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Input field styling */
.rocketship-reviews-settings input[type="text"],
.rocketship-reviews-settings input[type="password"],
.rocketship-reviews-settings input[type="number"],
.rocketship-reviews-settings select,
.rocketship-reviews-settings textarea {
    border: 2px solid #e2e4e7;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

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

.rocketship-reviews-settings .regular-text {
    width: 100%;
    max-width: 500px;
}

.rocketship-reviews-settings .small-text {
    width: 100px;
}

/* Description text */
.rocketship-reviews-settings .description {
    color: #646970;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.5;
    font-style: normal;
}

/* Button styling */
.rocketship-reviews-settings .button-secondary,
.rocketship-reviews-settings .button-primary {
    border-radius: 6px;
    font-weight: 500;
    padding: 8px 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rocketship-reviews-settings .button-secondary:hover,
.rocketship-reviews-settings .button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Test Results Styling */
#api-test-result {
    margin-left: 10px;
    font-weight: 500;
    font-size: 14px;
}

/* Shortcode Documentation Table */
.shortcode-params-table {
    margin-top: 15px;
}

.shortcode-params-table th,
.shortcode-params-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.shortcode-params-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #23282d;
}

.shortcode-params-table code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: #d63384;
}

/* Code examples styling */
.code-example {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    overflow-x: auto;
}

.code-example code {
    background: transparent;
    color: #495057;
    font-size: inherit;
    padding: 0;
}

/* Test Reviews Section */
.test-reviews-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.test-reviews-form label {
    font-weight: 600;
    color: #23282d;
    white-space: nowrap;
}

.test-reviews-form input[type="text"] {
    flex: 1;
    min-width: 250px;
}

#test-reviews-results {
    border-top: 1px solid #e1e1e1;
    padding-top: 20px;
}

#test-reviews-results h3 {
    color: #23282d;
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Sample reviews styling in admin */
#test-reviews-results .rocketship-reviews {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 15px;
    background: #f9f9f9;
}

#test-reviews-results .rocketship-review-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

#test-reviews-results .rocketship-review-item:last-child {
    margin-bottom: 0;
}

/* Status messages */
.reviews-status-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: 500;
}

.reviews-status-message.success {
    background: #d1edff;
    border: 1px solid #b3d4fc;
    color: #0073aa;
}

.reviews-status-message.error {
    background: #ffeaa7;
    border: 1px solid #fdcb6e;
    color: #d63031;
}

.reviews-status-message.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

/* Loading state */
.reviews-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #646970;
}

.reviews-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Responsive Design */
@media (min-width: 768px) {
    .rocketship-admin-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .rocketship-admin-card.full-width {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1200px) {
    .rocketship-admin-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .rocketship-admin-card:first-child {
        grid-column: 1;
    }
    
    .rocketship-admin-card:nth-child(2) {
        grid-column: 2;
        grid-row: 1 / 3;
    }
    
    .rocketship-admin-card:nth-child(3) {
        grid-column: 1;
    }
}

@media (max-width: 767px) {
    .test-reviews-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .test-reviews-form input[type="text"] {
        min-width: auto;
    }
    
    .rocketship-admin-card {
        padding: 15px;
    }
}

/* Page header styling to match existing pattern */
.wrap h1 {
    color: #1d2327;
    font-size: 2.2em;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Icon styling in headers */
.rocketship-admin-card h2 .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Success/Error states for API testing */
.api-test-success {
    color: #46b450 !important;
    font-weight: 600;
}

.api-test-error {
    color: #dc3232 !important;
    font-weight: 600;
}

.api-test-loading {
    color: #00a0d2 !important;
    font-weight: 600;
}

/* ==========================================================================
   SHORTCODE GENERATOR STYLES
   ========================================================================== */

.shortcode-generator {
    margin-top: 15px;
}

.generator-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-row {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-row label {
    font-weight: 600;
    color: #23282d;
    min-width: 120px;
}

.form-row input,
.form-row select {
    flex: 1;
    min-width: 200px;
}

.form-row small {
    flex-basis: 100%;
    color: #666;
    font-size: 12px;
    margin-left: 130px;
}

.slider-options {
    background: #f0f0f1;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.slider-options h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #23282d;
}

.generated-shortcode {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    padding: 15px;
}

.generated-shortcode h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #23282d;
}

/* ==========================================================================
   SAVED PLACE IDS STYLES
   ========================================================================== */

.saved-places-list {
    margin-top: 15px;
}

.saved-places-list .button-small {
    padding: 4px 8px;
    font-size: 11px;
    margin-right: 5px;
}

.saved-places-list code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-family: Monaco, Consolas, monospace;
}

/* ==========================================================================
   CUSTOM CSS EDITOR STYLES
   ========================================================================== */

.custom-css-editor {
    margin-top: 15px;
}

#custom-css {
    font-family: Monaco, Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    color: #333;
}

/* ==========================================================================
   ENHANCED FORM STYLES
   ========================================================================== */

.test-reviews-form {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

/* Layout preview thumbnails */
.layout-preview {
    display: inline-block;
    width: 60px;
    height: 40px;
    background: #f0f0f1;
    border: 2px solid transparent;
    border-radius: 4px;
    margin: 0 5px 5px 0;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.layout-preview:hover,
.layout-preview.selected {
    border-color: #007cba;
    background: #e3f2fd;
}

.layout-preview::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: #666;
}

.layout-preview.grid::before {
    content: '⊞';
}

.layout-preview.list::before {
    content: '☰';
}

.layout-preview.carousel::before {
    content: '⟨⟩';
}

.layout-preview.masonry::before {
    content: '⊠';
}

.layout-preview.testimonial::before {
    content: '"';
}

.layout-preview.card::before {
    content: '▢';
}

/* Style preview swatches */
.style-preview {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 5px 5px 0;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.style-preview:hover,
.style-preview.selected {
    border-color: #007cba;
    transform: scale(1.1);
}

.style-preview.modern {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.style-preview.classic {
    background: #ffffff;
    border-top: 4px solid #007cba;
}

.style-preview.minimal {
    background: transparent;
    border-left: 4px solid #007cba;
}

.style-preview.elegant {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.style-preview.bold {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-row label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .form-row small {
        margin-left: 0;
    }
    
    .form-row input,
    .form-row select {
        min-width: auto;
    }
}
