/**
 * WP-RolForum - Estilos para sistema de tiradas visuales
 * 
 * Proporciona todos los estilos necesarios para el modal de tiradas rápidas
 * 
 * @package WP_RolForum
 */

/* ===================================
   MODAL DE TIRADAS RÁPIDAS
   =================================== */

   #rolforum-quick-dice-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.rolforum-dice-modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 3% auto;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    color: white;
    position: relative;
    animation: slideDown 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rolforum-dice-modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 28px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.rolforum-dice-modal-content .rolforum-modal-cerrar {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}

.rolforum-dice-modal-content .rolforum-modal-cerrar:hover {
    transform: rotate(90deg);
    opacity: 0.7;
}

/* ===================================
   SELECTOR DE TIPO DE TIRADA
   =================================== */

.rolforum-dice-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.rolforum-dice-type-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.rolforum-dice-type-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.rolforum-dice-type-btn.active {
    background: rgba(255, 255, 255, 0.4);
    border-color: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.rolforum-dice-type-btn .dice-icon {
    font-size: 32px;
    display: block;
}

.rolforum-dice-type-btn .dice-label {
    font-weight: bold;
    text-align: center;
    line-height: 1.3;
}

/* ===================================
   FORMULARIOS DE TIRADA
   =================================== */

.rolforum-dice-form {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
}

.rolforum-form-field {
    margin-bottom: 20px;
}

.rolforum-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
}

.rolforum-form-field .required {
    color: #ffeb3b;
}

.rolforum-form-field input[type="text"],
.rolforum-form-field input[type="number"],
.rolforum-form-field select {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.rolforum-form-field input[type="text"]::placeholder,
.rolforum-form-field input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.rolforum-form-field input[type="text"]:focus,
.rolforum-form-field input[type="number"]:focus,
.rolforum-form-field select:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.rolforum-form-field select {
    cursor: pointer;
}

.rolforum-form-field select option {
    background: #764ba2;
    color: white;
}

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.8;
    font-style: italic;
}

/* Checkboxes personalizados */
.rolforum-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    background: rgba(255, 255, 255, 0.2);
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 14px;
}

/* Info box */
.rolforum-info-box {
    background: rgba(255, 255, 255, 0.2);
    border-left: 4px solid #ffeb3b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.rolforum-info-box p {
    margin: 0 0 10px 0;
}

.rolforum-info-box ul {
    margin: 0;
    padding-left: 20px;
}

.rolforum-info-box li {
    margin-bottom: 5px;
}

/* Botones de acción */
.rolforum-form-actions {
    text-align: center;
    margin-top: 25px;
}

.rolforum-dice-submit {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rolforum-dice-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.rolforum-dice-submit:active {
    transform: translateY(0);
}

.rolforum-dice-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===================================
   RESULTADOS DE TIRADAS
   =================================== */

.rolforum-visual-dice-result {
    background: white;
    color: #333;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.5s ease;
    opacity: 0;
}

.rolforum-visual-dice-result.show {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rolforum-dice-header {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.rolforum-dice-label {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}

.rolforum-dice-reason {
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.5;
}

.rolforum-dice-rolls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.rolforum-dice-rolls .used {
    color: #4CAF50;
    font-weight: bold;
    font-size: 24px;
}

.rolforum-dice-rolls .discarded {
    color: #999;
    font-size: 20px;
    text-decoration: line-through;
}

.rolforum-dice-type {
    text-align: center;
    font-size: 13px;
    color: #666;
    margin-top: 10px;
}

.rolforum-dice-final {
    text-align: center;
    font-size: 18px;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.rolforum-dice-final strong {
    font-size: 24px;
    color: #667eea;
}

/* Resultados evaluados */
.rolforum-dice-outcome {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: bold;
    margin-top: 15px;
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.rolforum-dice-outcome.rolforum-critical {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.rolforum-dice-outcome.rolforum-fumble {
    background: linear-gradient(135deg, #333 0%, #000 100%);
    color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.rolforum-dice-outcome.rolforum-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.rolforum-dice-outcome.rolforum-failure {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.5);
}

.rolforum-dice-outcome.rolforum-negative {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
}

.rolforum-dice-outcome.rolforum-positive {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.5);
}

/* ===================================
   ANIMACIÓN DE MONEDA
   =================================== */

.rolforum-coin-animation {
    text-align: center;
    padding: 40px 20px;
}

.coin-flip {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.coin {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: coinFlip 2s ease-in-out infinite;
}

@keyframes coinFlip {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.animation-text {
    font-size: 18px;
    font-weight: bold;
    color: white;
    margin-top: 20px;
}

.rolforum-coin-result {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.coin-result-icon {
    font-size: 80px;
    margin-bottom: 15px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.rolforum-coin-result h3 {
    margin: 10px 0;
    font-size: 24px;
    color: white;
}

.rolforum-coin-result p {
    margin: 10px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Estilos para resultado de destino */
.rolforum-dice-type-label {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
}

.rolforum-dice-coin {
    text-align: center;
    margin: 15px 0;
    font-size: 16px;
}

.rolforum-dice-coin .coin-cara {
    color: #4CAF50;
    font-weight: bold;
}

.rolforum-dice-coin .coin-cruz {
    color: #f44336;
    font-weight: bold;
}

.rolforum-dice-dusk,
.rolforum-dice-dusk-roll {
    text-align: center;
    margin: 10px 0;
    font-size: 15px;
}

.rolforum-dice-message {
    text-align: center;
    font-size: 18px;
    font-style: italic;
    padding: 20px;
    margin: 15px 0;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* ===================================
   INDICADORES DE CARGA Y ERRORES
   =================================== */

.rolforum-dice-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.rolforum-dice-loading p {
    color: white;
    font-size: 16px;
}

.rolforum-dice-error {
    background: #f44336;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.rolforum-dice-error .error-icon {
    font-size: 24px;
}

.rolforum-dice-error .error-message {
    flex: 1;
    font-size: 14px;
}

/* ===================================
   BOTÓN DE TIRADAS RÁPIDAS
   =================================== */

#rolforum-quick-dice-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-left: 10px;
}

#rolforum-quick-dice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#rolforum-quick-dice-btn:active {
    transform: translateY(0);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .rolforum-dice-modal-content {
        width: 95%;
        padding: 20px;
        margin: 5% auto;
    }
    
    .rolforum-dice-type-selector {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .rolforum-dice-type-btn {
        padding: 15px 10px;
    }
    
    .rolforum-dice-type-btn .dice-icon {
        font-size: 28px;
    }
    
    .rolforum-dice-form {
        padding: 20px;
    }
    
    .rolforum-dice-submit {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .coin {
        width: 80px;
        height: 80px;
    }
    
    .coin-result-icon {
        font-size: 60px;
    }
}

@media (max-width: 480px) {
    .rolforum-dice-modal-content h2 {
        font-size: 22px;
    }
    
    .rolforum-dice-rolls {
        flex-direction: column;
        gap: 10px;
    }
    
    #rolforum-quick-dice-btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
}