/* Meeting Scheduler Styles */

/* Authorization Section */
.ms-step-auth {
    text-align: center;
    padding: 30px 20px;
}

.ms-auth-section {
    max-width: 400px;
    margin: 0 auto;
}

.ms-auth-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.ms-step-auth h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.ms-step-auth p {
    color: #555;
    line-height: 1.5;
    margin-bottom: 25px;
}

.ms-auth-features {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #22c55e;
}

.ms-auth-feature {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.ms-auth-feature:last-child {
    margin-bottom: 0;
}

.ms-auth-feature-icon {
    color: #22c55e;
    font-weight: bold;
    margin-right: 10px;
    min-width: 16px;
}

.ms-btn-authorize {
    position: relative;
    padding-left: 50px !important;
    background: #4285f4 !important;
    border-color: #4285f4 !important;
    transition: all 0.3s ease;
}

.ms-btn-authorize:hover {
    background: #3367d6 !important;
    border-color: #3367d6 !important;
    transform: translateY(-1px);
}

.ms-btn-authorize .ms-btn-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
}

.ms-btn-authorize.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.ms-btn-authorize.loading:after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RTL Support for Authorization */
.ms-rtl .ms-auth-features {
    text-align: right;
    border-left: none;
    border-right: 4px solid #22c55e;
}

.ms-rtl .ms-auth-feature-icon {
    margin-right: 0;
    margin-left: 10px;
}

.ms-rtl .ms-btn-authorize {
    padding-left: 16px !important;
    padding-right: 50px !important;
}

.ms-rtl .ms-btn-authorize .ms-btn-icon {
    left: auto;
    right: 15px;
}

.ms-rtl .ms-btn-authorize.loading:after {
    right: auto;
    left: 15px;
}

/* Notification System */
.ms-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    max-width: 400px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.ms-notification-show {
    opacity: 1;
    transform: translateX(0);
}

.ms-notification-success {
    border-left: 4px solid #22c55e;
}

.ms-notification-error {
    border-left: 4px solid #ef4444;
}

.ms-notification-icon {
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.ms-notification-success .ms-notification-icon {
    color: #22c55e;
}

.ms-notification-error .ms-notification-icon {
    color: #ef4444;
}

.ms-notification-message {
    flex-grow: 1;
    color: #374151;
    font-size: 14px;
    line-height: 1.4;
}

.ms-notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.ms-notification-close:hover {
    color: #374151;
}

/* RTL Support for Notifications */
.ms-rtl .ms-notification {
    right: auto;
    left: 20px;
    transform: translateX(-100%);
}

.ms-rtl .ms-notification-show {
    transform: translateX(0);
}

.ms-rtl .ms-notification-success,
.ms-rtl .ms-notification-error {
    border-left: none;
    border-right: 4px solid;
}

.ms-rtl .ms-notification-success {
    border-right-color: #22c55e;
}

.ms-rtl .ms-notification-error {
    border-right-color: #ef4444;
}

/* RTL Support */
.ms-rtl {
    direction: rtl;
}

.ms-rtl .ms-modal-header {
    text-align: right;
}

.ms-rtl .ms-modal-close {
    left: 20px;
    right: auto;
}

.ms-rtl .ms-form-group label {
    text-align: right;
}

.ms-rtl .ms-form-group input,
.ms-rtl .ms-form-group textarea {
    text-align: right;
}

.ms-rtl .ms-calendar-nav.ms-calendar-prev {
    float: right;
}

.ms-rtl .ms-calendar-nav.ms-calendar-next {
    float: left;
}

.ms-rtl .ms-btn-back {
    float: right;
}

.ms-rtl .ms-btn-next,
.ms-rtl .ms-btn-book {
    float: left;
}

.ms-rtl .ms-selected-info {
    text-align: right;
}

.ms-rtl .ms-timezone-notice {
    text-align: right;
}

/* Button Styles */
.ms-schedule-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ms-schedule-button:hover {
    background: #005a87;
}

/* Modal Overlay */
.ms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Modal Container */
.ms-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: msModalSlideIn 0.3s ease-out;
}

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

/* Modal Header */
.ms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.ms-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.ms-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.ms-modal-close:hover {
    background: #f0f0f0;
}

/* Modal Body */
.ms-modal-body {
    padding: 24px;
}

/* Steps */
.ms-step {
    display: none;
}

.ms-step-active {
    display: block;
}

.ms-step h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

/* Calendar */
.ms-calendar-container {
    margin-bottom: 30px;
}

.ms-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ms-calendar-month {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ms-calendar-nav {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.ms-calendar-nav:hover {
    background: #f0f0f0;
}

.ms-calendar-grid {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.ms-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
}

.ms-calendar-weekdays div {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    border-right: 1px solid #e0e0e0;
}

.ms-calendar-weekdays div:last-child {
    border-right: none;
}

.ms-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.ms-calendar-day {
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ms-calendar-day:nth-child(7n) {
    border-right: none;
}

.ms-calendar-day:hover {
    background: #f0f0f0;
}

.ms-calendar-day.ms-other-month {
    color: #ccc;
    cursor: not-allowed;
}

.ms-calendar-day.ms-past {
    color: #ccc;
    cursor: not-allowed;
}

.ms-calendar-day.ms-unavailable {
    color: #ccc;
    cursor: not-allowed;
    background: #f8f8f8;
}

.ms-calendar-day.ms-selected {
    background: #0073aa;
    color: white;
}

.ms-calendar-day.ms-today {
    font-weight: bold;
    background: #e8f4f8;
}

/* Time Slots */
.ms-time-slots h5 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.ms-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.ms-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.ms-time-slot {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.ms-time-slot:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.ms-time-slot.ms-selected {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.ms-no-slots {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Selected Time Display */
.ms-selected-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ms-selected-info {
    font-size: 14px;
}

.ms-btn-change-time {
    font-size: 12px;
    padding: 6px 12px;
}

/* Form Styles */
.ms-booking-form {
    margin-bottom: 20px;
}

.ms-form-group {
    margin-bottom: 16px;
}

.ms-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ms-form-group input,
.ms-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.ms-form-group input:focus,
.ms-form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.ms-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.ms-form-group-checkbox {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
}

.ms-checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: normal !important;
    margin: 0 !important;
}

.ms-checkbox-label input[type="checkbox"] {
    margin: 0 !important;
    width: 18px !important;
    height: 18px !important;
    accent-color: #0073aa;
    flex-shrink: 0;
}

.ms-checkbox-text {
    font-size: 16px;
    line-height: 1.4;
    color: #333;
}

.ms-field-description {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-left: 30px;
}

.ms-checkbox-label:hover .ms-checkbox-text {
    color: #0073aa;
}

/* Buttons */
.ms-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.ms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ms-btn-primary {
    background: #0073aa;
    color: white;
}

.ms-btn-primary:hover:not(:disabled) {
    background: #005a87;
}

.ms-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.ms-btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
}

/* Step Actions */
.ms-step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Success/Error Messages */
.ms-success-message,
.ms-error-message {
    text-align: center;
    padding: 20px;
}

.ms-success-icon,
.ms-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.ms-success-icon {
    color: #46b450;
}

.ms-error-icon {
    color: #dc3232;
}

.ms-meeting-details {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
    text-align: left;
}

.ms-meeting-details h5 {
    margin-top: 0;
    margin-bottom: 10px;
}

.ms-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.ms-detail-row:last-child {
    border-bottom: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ms-modal-overlay {
        padding: 10px;
    }
    
    .ms-modal {
        max-height: 95vh;
    }
    
    .ms-modal-header,
    .ms-modal-body {
        padding: 16px;
    }
    
    .ms-time-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .ms-time-slot {
        padding: 8px;
        font-size: 13px;
    }
    
    .ms-calendar-day {
        padding: 8px;
        font-size: 14px;
    }
    
    .ms-selected-time {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .ms-step-actions {
        flex-direction: column;
    }
    
    .ms-btn {
        width: 100%;
    }
}
