/**
 * Modern Campaign Tabs Styles - FINAL VERSION
 * Clean, professional design matching Tab 1 exactly
 */

/* ============================================
   UNIFIED CARD STYLE - Light & Clean
   ============================================ */

.insim-message-composer-card,
.insim-settings-card,
.insim-confirmation-card {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 16px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    position: relative;
}

.insim-message-composer-content,
.insim-settings-content,
.insim-confirmation-content {
    position: relative;
    z-index: 1;
}

/* ============================================
   HEADER - Clean & Professional
   ============================================ */

.insim-message-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
}

.insim-message-icon {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.insim-message-icon .dashicons {
    color: white;
}

.insim-message-title {
    flex: 1;
}

.insim-message-title h3 {
    margin: 0;
    color: #1e40af;
    font-size: 26px;
    font-weight: 700;
}

.insim-message-title p {
    margin: 6px 0 0 0;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   TAB 2 - MESSAGE COMPOSER (Side by side layout)
   ============================================ */

/* Wrapper for message and preview side by side */
.insim-message-preview-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

#sendsms_msg {
    flex: 1;
    min-width: 0;
}

/* Preview on the right side - COMPACT SIZE (only 22% width) */
.insim-live-preview-inline {
    flex: 0 0 240px;
    position: sticky;
    top: 20px;
}

/* Variable Buttons */
.insim-variables-section {
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.insim-variables-label {
    color: #1e40af;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    display: block;
}

.insim-variables-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.insim-variable-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.insim-variable-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.insim-variable-btn .dashicons {
    font-size: 18px;
}

/* Message Stats */
.insim-message-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.insim-stat-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #bfdbfe;
}

.insim-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.2);
}

.insim-stat-label {
    color: #3b82f6;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.insim-stat-value {
    color: #1e40af;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.insim-stat-value .dashicons {
    font-size: 20px;
    color: #3b82f6;
}

/* ============================================
   LIVE PREVIEW - Inline (side by side)
   ============================================ */

.insim-sms-preview-wrapper {
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.insim-sms-preview-header {
    color: #1e40af;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #dbeafe;
}

.insim-phone-mockup {
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 28px;
    padding: 12px;
    max-width: 100%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.insim-phone-notch {
    width: 70px;
    height: 20px;
    background: #000;
    border-radius: 0 0 12px 12px;
    margin: 0 auto 10px;
}

.insim-phone-screen {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 18px;
    padding: 16px;
    min-height: 180px;
}

.insim-sms-bubble {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 12px 16px;
    border-radius: 14px;
    border-bottom-right-radius: 4px;
    font-size: 13px;
    line-height: 1.6;
    max-width: 90%;
    margin-left: auto;
    box-shadow: 0 3px 10px rgba(59, 130, 246, 0.35);
    word-wrap: break-word;
}

/* ============================================
   TAB 3 - SETTINGS (Ultra Modern Inputs)
   ============================================ */

/* Modern Title Input Section */
#sendsms_titleA {
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.1);
}

#sendsms_titleA label {
    color: #1e40af;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 14px;
    display: block;
}

.insim-setting-input,
input[name="sendsms_title"] {
    width: 100% !important;
    padding: 18px 24px !important;
    border: 2px solid #bfdbfe !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08) !important;
    color: #1e293b !important;
}

.insim-setting-input:focus,
input[name="sendsms_title"]:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 16px rgba(59, 130, 246, 0.2) !important;
    transform: translateY(-2px);
}

/* Modern Date Picker Section */
#sendsms_titleB {
    background: white;
    border: 3px solid #3b82f6;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.1);
}

#sendsms_titleB label {
    color: #1e40af;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    display: block;
}

.insim-datetime-input,
input[name="sendsms_date"],
input[name="sendsms_date_hour"],
input[name="sendsms_date_minute"] {
    padding: 16px 20px !important;
    border: 2px solid #bfdbfe !important;
    border-radius: 11px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08) !important;
    color: #1e293b !important;
}

.insim-datetime-input:focus,
input[name="sendsms_date"]:focus,
input[name="sendsms_date_hour"]:focus,
input[name="sendsms_date_minute"]:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 4px 16px rgba(59, 130, 246, 0.2) !important;
    transform: translateY(-2px);
}

/* Date picker wrapper styling */
#sendsms_titleB > div {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Time zone text */
#sendsms_titleB br + * {
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
}

/* ============================================
   TAB 4 - CONFIRMATION
   ============================================ */

/* Style the existing card inside cmp_details */
#cmp_details .card {
    background: white !important;
    border: 3px solid #3b82f6 !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.1) !important;
}

#cmp_details .card-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: none !important;
    border-radius: 11px 11px 0 0 !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 20px 26px !important;
}

#cmp_details .card-body {
    color: #1e293b !important;
    padding: 26px !important;
    background: #f8fafc !important;
}

#cmp_details .card-body p {
    color: #334155 !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
    font-weight: 500 !important;
}

#cmp_details .card-body span {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    color: #1e40af !important;
    font-weight: 700 !important;
    border: 1px solid #3b82f6 !important;
}

/* ============================================
   PROGRESS TRACKER
   ============================================ */

.insim-progress-wrapper {
    margin-bottom: 30px;
}

.insim-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
}

.insim-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.insim-progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #1e40af;
    font-weight: 700;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .insim-message-preview-wrapper {
        flex-direction: column;
    }

    .insim-live-preview-inline {
        flex: 1 1 auto;
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .insim-message-composer-card,
    .insim-settings-card,
    .insim-confirmation-card {
        padding: 25px;
    }

    .insim-message-stats {
        grid-template-columns: 1fr;
    }
}
