/**
 * Estilos para el panel de administración del plugin STRIMY oEmbed
 *
 * @since      1.0.0
 * @package    Strimy_oEmbed
 */

/* Estilos generales para la página de opciones */
.strimy-admin-wrapper {
    max-width: 1200px;
}

.strimy-admin-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.strimy-admin-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.strimy-admin-header > * {
    position: relative;
    z-index: 1;
}

.strimy-admin-header h2 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.strimy-admin-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Layout de contenido */
.strimy-admin-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.strimy-main-content {
    flex: 2;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.strimy-sidebar {
    flex: 1;
}

/* Cajas de la sidebar */
.strimy-sidebar-box {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.strimy-sidebar-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.strimy-sidebar-box h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Ejemplos de uso */
.strimy-usage-examples h4 {
    color: #667eea;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.strimy-usage-examples h4:first-of-type {
    margin-top: 15px;
}

.strimy-usage-examples code {
    display: block;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 12px 15px;
    border-radius: 6px;
    margin: 10px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #495057;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.strimy-usage-examples ul {
    margin-left: 20px;
    margin-top: 10px;
}

.strimy-usage-examples ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.strimy-usage-examples ul li strong {
    color: #667eea;
    font-weight: 600;
}

/* Caja de información */
.strimy-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0;
    position: relative;
}

.strimy-info-box h5 {
    margin: 0 0 8px 0;
    color: #1565c0;
    font-size: 14px;
    font-weight: 600;
}

.strimy-info-box p {
    margin: 0;
    color: #424242;
    font-size: 13px;
    line-height: 1.4;
}

/* Campos de formulario personalizados */
.strimy-form-field {
    margin-bottom: 25px;
}

.strimy-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
}

.strimy-form-field input[type="text"],
.strimy-form-field select {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.strimy-form-field .description {
    margin-top: 8px;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* Checkbox personalizado */
.strimy-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.strimy-checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* Botones */
.button-primary.strimy-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button-primary.strimy-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Estados de validación */
.strimy-field-valid {
    border-color: #28a745 !important;
}

.strimy-field-invalid {
    border-color: #dc3545 !important;
}

.strimy-validation-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.strimy-validation-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.strimy-validation-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

/* Responsive design */
@media (max-width: 1024px) {
    .strimy-admin-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .strimy-main-content,
    .strimy-sidebar {
        flex: none;
    }
}

@media (max-width: 768px) {
    .strimy-admin-header {
        padding: 20px;
        text-align: center;
    }
    
    .strimy-admin-header h2 {
        font-size: 24px;
    }
    
    .strimy-main-content,
    .strimy-sidebar-box {
        padding: 20px;
    }
    
    .strimy-usage-examples code {
        font-size: 12px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .strimy-admin-header {
        padding: 15px;
    }
    
    .strimy-main-content,
    .strimy-sidebar-box {
        padding: 15px;
    }
    
    .strimy-form-field input[type="text"],
    .strimy-form-field select {
        max-width: 100%;
    }
}

/* Animaciones */
@keyframes strimy-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.strimy-sidebar-box {
    animation: strimy-slide-in 0.3s ease-out;
}

.strimy-sidebar-box:nth-child(2) {
    animation-delay: 0.1s;
}

.strimy-sidebar-box:nth-child(3) {
    animation-delay: 0.2s;
}

.strimy-sidebar-box:nth-child(4) {
    animation-delay: 0.3s;
}

/* Options page layout */
.strimy-admin-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.strimy-main-column {
    flex: 2;
}

.strimy-sidebar-column {
    flex: 1;
    max-width: 350px;
}

.postbox {
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.postbox-header {
    border-bottom: 1px solid #c3c4c7;
    background: #fff;
}

.postbox-header h2.hndle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #1d2327;
    border: none;
    background: none;
}

.postbox-header .dashicons {
    color: #2271b1;
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

.postbox .inside {
    padding: 16px;
    margin: 0;
}

.strimy-api-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.strimy-api-status {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.strimy-api-status.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.strimy-api-status.error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.strimy-api-status.loading {
    background: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}

.strimy-usage-info {
    margin: 0;
}

.strimy-usage-info h3 {
    margin: 0 0 16px 0;
    padding: 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.strimy-method {
    margin-bottom: 16px;
    padding: 16px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.strimy-method:last-child {
    margin-bottom: 0;
}

.strimy-method h4 {
    margin: 0 0 8px 0;
    padding: 0;
    color: #2271b1;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strimy-method .dashicons {
    color: #2271b1;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.strimy-method p {
    margin: 8px 0 0 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #50575e;
}

.strimy-method code {
    display: block;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #1d2327;
}

.strimy-responsive-note {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: 4px;
}

.strimy-responsive-note p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #664d03;
}

.strimy-features-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.strimy-features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #50575e;
}

.strimy-features-list li:last-child {
    margin-bottom: 0;
}

.strimy-features-list .dashicons {
    color: #00a32a;
    font-size: 16px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.button .dashicons {
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    vertical-align: text-top;
}

.postbox .inside p {
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.postbox .inside p:last-child {
    margin-bottom: 0;
}

.postbox .inside h4 {
    margin: 0 0 12px 0;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: #1d2327;
}

@media (max-width: 782px) {
    .strimy-admin-layout {
        flex-direction: column;
        gap: 16px;
    }

    .strimy-sidebar-column {
        max-width: none;
    }

    .strimy-api-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .postbox-header h2.hndle {
        padding: 12px 16px;
        font-size: 13px;
        gap: 8px;
    }

    .postbox-header .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }

    .postbox .inside {
        padding: 12px;
    }

    .strimy-method {
        padding: 12px;
    }

    .strimy-method h4 {
        font-size: 13px;
    }
}
