// Copyright (c) 2014, 2025, Oracle and/or its affiliates.  Licensed under The Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl/

@import "../../utilities/oj.utilities";
@import "../../common/helpers/oj.common.helpers";

// ----- start dependencies ---------

// set up include variables before importing dependencies
@if $includeMessagesClasses != false {
  $includeIconClasses: true !global;
  $includePopupClasses: true !global;
  $includeMessageClasses: true !global;
  $includeAnimationClasses: true !global;
}

// import dependencies
@import "oj.alta.icons";
@import "oj.alta.popup";
@import "oj.alta.message";

// ----- end dependencies ---------

// import classes defined in the common directory
@import "../../common/widgets/oj.common.messages";

@if $includeMessagesClasses != false {
  @include module-include-once("alta.messages") {
    
    //INDIVIDUAL MESSAGE OVERRIDES
    //////////////////////////////
    
    .oj-messages-inline .oj-message-header,
    .oj-messages-general .oj-message-header,
    .oj-messages-notification .oj-message-header {
      @include oj-ltr() {
        padding: 8px 7px 0px 15px;
      }
      @include oj-rtl() {
        padding: 8px 15px 0px 7px;
      }
    }
    
    .oj-messages-inline .oj-message-body,
    .oj-messages-general .oj-message-body {
      padding: 0px 15px 13px 15px;
    }
    
    .oj-messages-notification .oj-message-body {
      padding: 0px 15px 13px 15px;
    }
    
    .oj-messages-notification .oj-message-category,
    .oj-messages-notification .oj-message-header .oj-message-summary {
      padding: 0px 6px;
    }
    
    .oj-messages-notification .oj-message-timestamp {
      padding: 0px 2px;
    }
    
    .oj-messages-general .oj-message-timestamp,
    .oj-messages-inline .oj-message-timestamp {
      padding: 0px 5px;
    }
    
    // Large-up screen responsive overrides
    @if $responsiveQueryLargeUp and $responsiveQueryLargeUp != none {
      @media  #{$responsiveQueryLargeUp} {
        
        //INDIVIDUAL MESSAGE OVERRIDES
        //////////////////////////////
        
        .oj-messages-general .oj-message-header,
        .oj-messages-inline .oj-message-header {
          @include oj-ltr() {
            padding: 11px 12px 0px 20px;
          }
          @include oj-rtl() {
            padding: 11px 20px 0px 12px;
          }
        }
        
        .oj-messages-general .oj-message-body,
        .oj-messages-inline .oj-message-body {
          @include oj-ltr() {
            padding: 0px 20px 20px 46px;
          }
          @include oj-rtl() {
            padding: 0px 46px 20px 20px;
          }
        }
        
        .oj-messages-general .oj-message-category,
        .oj-messages-inline .oj-message-category,
        .oj-messages-general .oj-message-header .oj-message-summary,
        .oj-messages-inline .oj-message-header .oj-message-summary {
          padding: 0px 10px;
        }
      }
    }
    
    // Medium-up screen responsive overrides
    @if $responsiveQueryMediumUp and $responsiveQueryMediumUp != none {
      @media  #{$responsiveQueryMediumUp} {
        
        //INDIVIDUAL MESSAGE OVERRIDES
        //////////////////////////////
        
        .oj-messages-notification .oj-message-header {
          @include oj-ltr() {
            padding: 3px 7px 0px 15px;
          }
          @include oj-rtl() {
            padding: 3px 15px 0px 7px;
          }
        }
      }
    }
    
    // Medium screen responsive overrides
    @if $responsiveQueryMediumOnly and $responsiveQueryMediumOnly != none {
      @media  #{$responsiveQueryMediumOnly} {
        
        //INDIVIDUAL MESSAGE OVERRIDES
        //////////////////////////////
        
        .oj-messages-general .oj-message-header,
        .oj-messages-inline .oj-message-header {
          @include oj-ltr() {
            padding: 8px 7px 0px 15px;
          }
          @include oj-rtl() {
            padding: 8px 15px 0px 7px;
          }
        }
      }
    }
    
    // Small screen responsive overrides
    @if $responsiveQuerySmallOnly and $responsiveQuerySmallOnly != none {
      @media  #{$responsiveQuerySmallOnly} {
        
        //INDIVIDUAL MESSAGE OVERRIDES
        //////////////////////////////
        
        .oj-messages-inline .oj-message-header,
        .oj-messages-general .oj-message-header,
        .oj-messages-notification .oj-message-header {
          @include oj-ltr() {
            padding: 3px 2px 0px 10px;
          }
          @include oj-rtl() {
            padding: 3px 10px 0px 2px;
          }
        }
         
        .oj-messages-general .oj-message-timestamp,
        .oj-messages-notification .oj-message-timestamp {
          padding: 0px 2px;
        }
        
        .oj-messages-inline .oj-message-body,
        .oj-messages-general .oj-message-body,
        .oj-messages-notification .oj-message-body {
          padding: 0px 10px 13px 10px;
        }
      }
    }
  }
}
